options: support multiple signing keys

This commit is contained in:
Caleb Doxsey 2022-12-20 11:11:52 -07:00
parent c048af7523
commit 41b51d04ef
12 changed files with 223 additions and 67 deletions

View file

@ -7,7 +7,7 @@ import (
type evaluatorConfig struct {
policies []config.Policy
clientCA []byte
signingKey string
signingKey []byte
authenticateURL string
googleCloudServerlessAuthenticationServiceAccount string
jwtClaimsHeaders config.JWTClaimHeaders
@ -39,7 +39,7 @@ func WithClientCA(clientCA []byte) Option {
}
// WithSigningKey sets the signing key and algorithm in the config.
func WithSigningKey(signingKey string) Option {
func WithSigningKey(signingKey []byte) Option {
return func(cfg *evaluatorConfig) {
cfg.signingKey = signingKey
}