fix: referesh JWKS public keys upon failure (#10368)

fixes #10359
This commit is contained in:
Harshavardhana
2020-08-28 08:15:12 -07:00
committed by GitHub
parent 46ee8659b4
commit e730da1438
3 changed files with 19 additions and 2 deletions

View File

@@ -20,6 +20,7 @@ import (
"crypto"
"encoding/json"
"net/url"
"sync"
"testing"
"time"
@@ -89,6 +90,7 @@ func TestJWTAzureFail(t *testing.T) {
}
cfg := Config{}
cfg.mutex = &sync.Mutex{}
cfg.JWKS.URL = u1
cfg.publicKeys = keys
jwt := NewJWT(cfg)
@@ -136,6 +138,7 @@ func TestJWT(t *testing.T) {
}
cfg := Config{}
cfg.mutex = &sync.Mutex{}
cfg.JWKS.URL = u1
cfg.publicKeys = keys
jwt := NewJWT(cfg)