feat(rp): Adding end_session endpoint to relaying party interface (#179)
This commit is contained in:
parent
ff124f87f5
commit
9b0954f3d4
1 changed files with 9 additions and 0 deletions
|
@ -50,6 +50,9 @@ type RelyingParty interface {
|
||||||
//Signer is used if the relaying party uses the JWT Profile
|
//Signer is used if the relaying party uses the JWT Profile
|
||||||
Signer() jose.Signer
|
Signer() jose.Signer
|
||||||
|
|
||||||
|
//GetEndSessionEndpoint returns the endpoint to sign out on a IDP
|
||||||
|
GetEndSessionEndpoint() string
|
||||||
|
|
||||||
//UserinfoEndpoint returns the userinfo
|
//UserinfoEndpoint returns the userinfo
|
||||||
UserinfoEndpoint() string
|
UserinfoEndpoint() string
|
||||||
|
|
||||||
|
@ -117,6 +120,10 @@ func (rp *relyingParty) UserinfoEndpoint() string {
|
||||||
return rp.endpoints.UserinfoURL
|
return rp.endpoints.UserinfoURL
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (rp *relyingParty) GetEndSessionEndpoint() string {
|
||||||
|
return rp.endpoints.EndSessionURL
|
||||||
|
}
|
||||||
|
|
||||||
func (rp *relyingParty) IDTokenVerifier() IDTokenVerifier {
|
func (rp *relyingParty) IDTokenVerifier() IDTokenVerifier {
|
||||||
if rp.idTokenVerifier == nil {
|
if rp.idTokenVerifier == nil {
|
||||||
rp.idTokenVerifier = NewIDTokenVerifier(rp.issuer, rp.oauthConfig.ClientID, NewRemoteKeySet(rp.httpClient, rp.endpoints.JKWsURL), rp.verifierOpts...)
|
rp.idTokenVerifier = NewIDTokenVerifier(rp.issuer, rp.oauthConfig.ClientID, NewRemoteKeySet(rp.httpClient, rp.endpoints.JKWsURL), rp.verifierOpts...)
|
||||||
|
@ -476,6 +483,7 @@ type Endpoints struct {
|
||||||
IntrospectURL string
|
IntrospectURL string
|
||||||
UserinfoURL string
|
UserinfoURL string
|
||||||
JKWsURL string
|
JKWsURL string
|
||||||
|
EndSessionURL string
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetEndpoints(discoveryConfig *oidc.DiscoveryConfiguration) Endpoints {
|
func GetEndpoints(discoveryConfig *oidc.DiscoveryConfiguration) Endpoints {
|
||||||
|
@ -488,6 +496,7 @@ func GetEndpoints(discoveryConfig *oidc.DiscoveryConfiguration) Endpoints {
|
||||||
IntrospectURL: discoveryConfig.IntrospectionEndpoint,
|
IntrospectURL: discoveryConfig.IntrospectionEndpoint,
|
||||||
UserinfoURL: discoveryConfig.UserinfoEndpoint,
|
UserinfoURL: discoveryConfig.UserinfoEndpoint,
|
||||||
JKWsURL: discoveryConfig.JwksURI,
|
JKWsURL: discoveryConfig.JwksURI,
|
||||||
|
EndSessionURL: discoveryConfig.EndSessionEndpoint,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue