Verify main v extra JWT bearers differently

When using the configured provider JWT Verifier, it makes
sense to use the provider `CreateSessionStateFromBearerToken`
method. For any extra JWT Issuers, they should use a generic
default verifier.
This commit is contained in:
Nick Meves
2020-06-19 11:47:36 -07:00
parent 5817028bb1
commit 788d8ecc1b
4 changed files with 106 additions and 64 deletions
-4
View File
@@ -178,10 +178,6 @@ func Validate(o *options.Options) error {
}
if o.SkipJwtBearerTokens {
// If we are using an oidc provider, go ahead and add that provider to the list
if o.GetOIDCVerifier() != nil {
o.SetJWTBearerVerifiers(append(o.GetJWTBearerVerifiers(), o.GetOIDCVerifier()))
}
// Configure extra issuers
if len(o.ExtraJwtIssuers) > 0 {
var jwtIssuers []jwtIssuer