fix: add missing WithCustomEndSessionEndpoint
This commit is contained in:
parent
3d46c17fa0
commit
5af734d72f
1 changed files with 24 additions and 14 deletions
|
@ -29,12 +29,12 @@ const (
|
|||
|
||||
var (
|
||||
DefaultEndpoints = &endpoints{
|
||||
Authorization: NewEndpoint(defaultAuthorizationEndpoint),
|
||||
Token: NewEndpoint(defaulTokenEndpoint),
|
||||
IntrospectionEndpoint: NewEndpoint(defaultIntrospectEndpoint),
|
||||
Userinfo: NewEndpoint(defaultUserinfoEndpoint),
|
||||
EndSessionEndpoint: NewEndpoint(defaultEndSessionEndpoint),
|
||||
JwksURI: NewEndpoint(defaultKeysEndpoint),
|
||||
Authorization: NewEndpoint(defaultAuthorizationEndpoint),
|
||||
Token: NewEndpoint(defaulTokenEndpoint),
|
||||
Introspection: NewEndpoint(defaultIntrospectEndpoint),
|
||||
Userinfo: NewEndpoint(defaultUserinfoEndpoint),
|
||||
EndSession: NewEndpoint(defaultEndSessionEndpoint),
|
||||
JwksURI: NewEndpoint(defaultKeysEndpoint),
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -68,13 +68,13 @@ type Config struct {
|
|||
}
|
||||
|
||||
type endpoints struct {
|
||||
Authorization Endpoint
|
||||
Token Endpoint
|
||||
IntrospectionEndpoint Endpoint
|
||||
Userinfo Endpoint
|
||||
EndSessionEndpoint Endpoint
|
||||
CheckSessionIframe Endpoint
|
||||
JwksURI Endpoint
|
||||
Authorization Endpoint
|
||||
Token Endpoint
|
||||
Introspection Endpoint
|
||||
Userinfo Endpoint
|
||||
EndSession Endpoint
|
||||
CheckSessionIframe Endpoint
|
||||
JwksURI Endpoint
|
||||
}
|
||||
|
||||
type DefaultOPOpts func(o *DefaultOP) error
|
||||
|
@ -109,6 +109,16 @@ func WithCustomUserinfoEndpoint(endpoint Endpoint) DefaultOPOpts {
|
|||
}
|
||||
}
|
||||
|
||||
func WithCustomEndSessionEndpoint(endpoint Endpoint) DefaultOPOpts {
|
||||
return func(o *DefaultOP) error {
|
||||
if err := endpoint.Validate(); err != nil {
|
||||
return err
|
||||
}
|
||||
o.endpoints.EndSession = endpoint
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func WithCustomKeysEndpoint(endpoint Endpoint) DefaultOPOpts {
|
||||
return func(o *DefaultOP) error {
|
||||
if err := endpoint.Validate(); err != nil {
|
||||
|
@ -204,7 +214,7 @@ func (p *DefaultOP) UserinfoEndpoint() Endpoint {
|
|||
}
|
||||
|
||||
func (p *DefaultOP) EndSessionEndpoint() Endpoint {
|
||||
return Endpoint(p.endpoints.EndSessionEndpoint)
|
||||
return Endpoint(p.endpoints.EndSession)
|
||||
}
|
||||
|
||||
func (p *DefaultOP) KeysEndpoint() Endpoint {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue