From c3e583bbf9924493e6d2ad19e8b91f2e068d84f2 Mon Sep 17 00:00:00 2001 From: Livio Amstutz Date: Thu, 27 Feb 2020 09:04:04 +0100 Subject: [PATCH] fix: add missing WithCustomKeysEndpoint --- pkg/op/default_op.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkg/op/default_op.go b/pkg/op/default_op.go index 63d9cd30..a6c40c0c 100644 --- a/pkg/op/default_op.go +++ b/pkg/op/default_op.go @@ -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 { return func(o *DefaultOP) error { o.interceptor = h