From 80a4493f22d5530cff7c9321b44f400310cb4a75 Mon Sep 17 00:00:00 2001 From: Darko Luketic Date: Wed, 17 Nov 2021 11:11:55 +0100 Subject: [PATCH] add new defaults --- options/options.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/options/options.go b/options/options.go index a5a4d5b..66e3d11 100644 --- a/options/options.go +++ b/options/options.go @@ -15,6 +15,9 @@ type ErrorsContextKeyName string // DefaultClaimsContextKeyName is of type ClaimsContextKeyName and defaults to "claims" const DefaultClaimsContextKeyName ClaimsContextKeyName = "claims" +// DefaultErrorsContextKeyName is of type ErrorsContextKeyName and defaults to "oidcerrors" +const DefaultErrorsContextKeyName ErrorsContextKeyName = "oidcerrors" + // ErrorHandler is called by the middleware if not nil type ErrorHandler func(description ErrorDescription, err error) @@ -62,6 +65,8 @@ func New(setters ...Option) *Options { AllowedTokenDrift: 10 * time.Second, HttpClient: http.DefaultClient, ClaimsContextKeyName: DefaultClaimsContextKeyName, + Permissive: false, + ErrorsContextKeyName: DefaultErrorsContextKeyName, } for _, setter := range setters {