config: support map of jwt claim headers (#1906)

* config: support map of jwt claim headers

* fix array handling, add test

* update docs

* use separate hook, add tests
This commit is contained in:
Caleb Doxsey 2021-02-17 13:43:18 -07:00 committed by GitHub
parent d04416a5fd
commit 1a1cc30c67
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 482 additions and 269 deletions

View file

@ -33,7 +33,7 @@ func TestAuthorize_okResponse(t *testing.T) {
Rego: []string{"allow = true"},
}},
}},
JWTClaimsHeaders: []string{"email"},
JWTClaimsHeaders: config.NewJWTClaimHeaders("email"),
}
a := &Authorize{currentOptions: config.NewAtomicOptions(), state: newAtomicAuthorizeState(new(authorizeState))}
encoder, _ := jws.NewHS256Signer([]byte{0, 0, 0, 0})