add new defaults
This commit is contained in:
parent
b0d46aaec3
commit
80a4493f22
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user