Merge remote-tracking branch 'origin/master' into token

This commit is contained in:
Livio Amstutz 2020-02-27 17:40:31 +01:00
commit 4de855dc21

View file

@ -103,6 +103,16 @@ func WithCustomUserinfoEndpoint(endpoint Endpoint) DefaultOPOpts {
} }
} }
func WithCustomKeysEndpoint(endpoint Endpoint) DefaultOPOpts {
return func(o *DefaultOP) error {
if err := endpoint.Validate(); err != nil {
return err
}
o.endpoints.JwksURI = endpoint
return nil
}
}
func WithHttpInterceptor(h HttpInterceptor) DefaultOPOpts { func WithHttpInterceptor(h HttpInterceptor) DefaultOPOpts {
return func(o *DefaultOP) error { return func(o *DefaultOP) error {
o.interceptor = h o.interceptor = h