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