Skip to content

Commit c78812c

Browse files
committed
fix: some provider like yahoo uses key token_revocation_endpoint
1 parent 545c012 commit c78812c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

provider.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
package goic
22

33
import (
4+
"encoding/base64"
45
"encoding/json"
56
"log"
67
"net/http"
8+
"net/url"
79
"strings"
810
)
911

@@ -27,6 +29,7 @@ type WellKnown struct {
2729
UserInfoURI string `json:"userinfo_endpoint"`
2830
SignOutURI string `json:"end_session_endpoint,omitempty"`
2931
RevokeURI string `json:"revocation_endpoint,omitempty"`
32+
XRevokeURI string `json:"token_revocation_endpoint,omitempty"`
3033
AlgoSupport []string `json:"id_token_signing_alg_values_supported"`
3134
jwks struct {
3235
Keys []struct {
@@ -102,6 +105,10 @@ func (p *Provider) getWellKnown() (*WellKnown, error) {
102105
return nil, err
103106
}
104107

108+
if p.wellKnown.RevokeURI == "" && p.wellKnown.XRevokeURI != "" {
109+
p.wellKnown.RevokeURI = p.wellKnown.XRevokeURI
110+
}
111+
105112
if p.wellKnown.KeysURI == "" {
106113
return p.wellKnown, nil
107114
}

0 commit comments

Comments
 (0)