feat: rp.RefreshAccessToken() now may provide an updated IDToken

This commit is contained in:
David Sharnoff 2023-04-11 17:37:19 -07:00
parent 44f8403574
commit 8a3ef0b0f3
4 changed files with 14 additions and 4 deletions

View file

@ -53,6 +53,7 @@ func TestRelyingPartySession(t *testing.T) {
t.Logf("new token type %s", newTokens.TokenType)
t.Logf("new expiry %s", newTokens.Expiry.Format(time.RFC3339))
require.NotEmpty(t, newTokens.AccessToken, "new accessToken")
assert.NotEmpty(t, newTokens.Extra("id_token"), "new idToken")
t.Log("------ end session (logout) ------")
@ -141,7 +142,6 @@ func TestResourceServerTokenExchange(t *testing.T) {
require.Error(t, err, "refresh token")
assert.Contains(t, err.Error(), "subject_token is invalid")
require.Nil(t, tokenExchangeResponse, "token exchange response")
}
func RunAuthorizationCodeFlow(t *testing.T, opServer *httptest.Server, clientID, clientSecret string) (provider rp.RelyingParty, accessToken, refreshToken, idToken string) {