Skip to content

Commit

Permalink
spec: Extend configuration with exclude_not_before_claim
Browse files Browse the repository at this point in the history
  • Loading branch information
anderslauri committed Mar 31, 2021
1 parent 9e46edb commit 607e898
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions driver/config/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ const (
KeyGrantAllClientCredentialsScopesPerDefault = "oauth2.client_credentials.default_grant_allowed_scope"
KeyExposeOAuth2Debug = "oauth2.expose_internal_errors"
KeyOAuth2LegacyErrors = "oauth2.include_legacy_error_fields"
KeyExcludeNotBeforeClaim = "oauth2.exclude_not_before_claim"
)

const DSNMemory = "memory"
Expand Down Expand Up @@ -237,6 +238,10 @@ func (p *Provider) EncryptSessionData() bool {
return p.p.BoolF(KeyEncryptSessionData, true)
}

func (p *Provider) ExcludeNotBeforeClaim() bool {
return p.p.BoolF(KeyExcludeNotBeforeClaim, false)
}

func (p *Provider) DataSourcePlugin() string {
return p.p.String(KeyDSN)
}
Expand Down
8 changes: 8 additions & 0 deletions spec/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -766,6 +766,14 @@
true
]
},
"exclude_not_before_claim": {
"type": "boolean",
"description": "Set to true if you want to exclude claim `nbf (not before)` part of access token.",
"default": false,
"examples": [
true
]
},
"hashers": {
"type": "object",
"additionalProperties": false,
Expand Down

0 comments on commit 607e898

Please sign in to comment.