fix: use issuer for jwt profile check on system api (#3741)

This commit is contained in:
Livio Amstutz
2022-05-31 13:11:49 +02:00
committed by GitHub
parent 1655656f99
commit 81c0ca3337
2 changed files with 4 additions and 3 deletions

View File

@@ -35,7 +35,7 @@ type authZRepo interface {
ExistsOrg(ctx context.Context, orgID string) error
}
func Start(authZRepo authZRepo, systemAPI string, keys map[string]*SystemAPIUser) (v *TokenVerifier) {
func Start(authZRepo authZRepo, issuer string, keys map[string]*SystemAPIUser) (v *TokenVerifier) {
return &TokenVerifier{
authZRepo: authZRepo,
systemJWTProfile: op.NewJWTProfileVerifier(
@@ -43,7 +43,7 @@ func Start(authZRepo authZRepo, systemAPI string, keys map[string]*SystemAPIUser
keys: keys,
cachedKeys: make(map[string]*rsa.PublicKey),
},
systemAPI,
issuer,
1*time.Hour,
time.Second,
),