refreshToken

suspend fun refreshToken(refreshToken: String): OidcTokenRefreshResult(source)

Refreshes token material for this provider using the supplied refresh token.

Concurrent callers with the same refresh token share one token-endpoint request. After success, the result remains available for OidcProviderConfig.tokenRefreshCacheTtl so stragglers reuse it. Duration.ZERO coalesces in-flight work only.

Report a problem

Return

Raw token response fields and an optional verified ID-token principal.

Parameters

refreshToken

Refresh token to send to the provider token endpoint.

Throws

when OAuth is not enabled.

when tokens in the refresh response fail validation.

when the ID token in the refresh response cannot be verified because the JWKS is unavailable.

when the provider rejects the request, for example, with an invalid_grant error response.