mirror of
https://github.com/pomerium/pomerium.git
synced 2025-06-09 06:12:42 +02:00
zero/api: reset token and url cache if 401 is received (#5256)
zero/api: reset token cache if 401 is received
This commit is contained in:
parent
a04d1a450c
commit
ce12e51cf5
8 changed files with 91 additions and 32 deletions
|
@ -46,7 +46,7 @@ func TestAPIClient(t *testing.T) {
|
|||
require.NoError(t, err)
|
||||
|
||||
tokenCache := token.NewCache(fetcher, "refresh-token")
|
||||
client, err := api.NewAuthorizedClient(srv.URL, tokenCache.GetToken, http.DefaultClient)
|
||||
client, err := api.NewAuthorizedClient(srv.URL, tokenCache, http.DefaultClient)
|
||||
require.NoError(t, err)
|
||||
|
||||
resp, err := client.ExchangeClusterIdentityTokenWithResponse(context.Background(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue