Auth: Respect cache control for JWKS in auth.jwt (#68872)
* respect cache control for auth.jwt * add documentation * add small note on cache control header ignores * make distinction of env
This commit is contained in:
@@ -109,6 +109,16 @@ func TestVerifyUsingJWKSetURL(t *testing.T) {
|
||||
})
|
||||
require.NoError(t, err)
|
||||
|
||||
_, err = initAuthService(t, func(t *testing.T, cfg *setting.Cfg) {
|
||||
cfg.JWTAuthJWKSetURL = "http://example.com/.well-known/jwks.json"
|
||||
})
|
||||
require.NoError(t, err)
|
||||
|
||||
oldEnv := setting.Env
|
||||
setting.Env = setting.Prod
|
||||
defer func() {
|
||||
setting.Env = oldEnv
|
||||
}()
|
||||
_, err = initAuthService(t, func(t *testing.T, cfg *setting.Cfg) {
|
||||
cfg.JWTAuthJWKSetURL = "http://example.com/.well-known/jwks.json"
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user