mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
JWT: Fallthrough to fetch keyset in case of cache error (#80081)
fallthrough to fetch keyset in case of cache error. Fixes #67582
This commit is contained in:
@@ -194,7 +194,11 @@ func (ks *keySetHTTP) getJWKS(ctx context.Context) (keySetJWKS, error) {
|
||||
if ks.cacheExpiration > 0 {
|
||||
if val, err := ks.cache.Get(ctx, ks.cacheKey); err == nil {
|
||||
err := json.Unmarshal(val, &jwks)
|
||||
return jwks, err
|
||||
if err != nil {
|
||||
ks.log.Warn("Failed to unmarshal key set from cache", "err", err)
|
||||
} else {
|
||||
return jwks, err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user