Fix mistake in previous commit

This commit is contained in:
Ryan Richard 2021-10-22 14:06:31 -07:00
parent e0db59fd09
commit 303b1f07d3
2 changed files with 2 additions and 2 deletions

View File

@ -813,7 +813,7 @@ func (h *handlerState) handleRefresh(ctx context.Context, refreshToken *oidctype
refreshed, err := upstreamOIDCIdentityProvider.PerformRefresh(ctx, refreshToken.Token) refreshed, err := upstreamOIDCIdentityProvider.PerformRefresh(ctx, refreshToken.Token)
if err != nil { if err != nil {
// Ignore errors during refresh, but return nil which will trigger the full login flow. // Ignore errors during refresh, but return nil which will trigger the full login flow.
h.logger.V(debugLogLevel).Info("Pinniped: Refresh failed.", "err", err) h.logger.V(debugLogLevel).Info("Pinniped: Refresh failed.", "error", err.Error())
return nil, nil return nil, nil
} }

View File

@ -513,7 +513,7 @@ func TestLogin(t *testing.T) { // nolint:gocyclo
wantLogs: []string{ wantLogs: []string{
`"level"=4 "msg"="Pinniped: Performing OIDC discovery" "issuer"="` + successServer.URL + `"`, `"level"=4 "msg"="Pinniped: Performing OIDC discovery" "issuer"="` + successServer.URL + `"`,
`"level"=4 "msg"="Pinniped: Refreshing cached token."`, `"level"=4 "msg"="Pinniped: Refreshing cached token."`,
`"level"=4 "msg"="Pinniped: Refresh failed."`, `"level"=4 "msg"="Pinniped: Refresh failed." "error"="oauth2: cannot fetch token: 400 Bad Request\nResponse: expected client_id 'test-client-id'\n"`,
`"msg"="could not open callback listener" "error"="some listen error"`, `"msg"="could not open callback listener" "error"="some listen error"`,
}, },
// Expect this to fall through to the authorization code flow, so it fails here. // Expect this to fall through to the authorization code flow, so it fails here.