refreshToken
Attempt to refresh a token using the provided refresh token string.
On success, a TokenRefreshedEvent is emitted on events. If an IdTokenValidator is configured, the ID token is validated before the event is emitted.
Return
Result.success with the new TokenInfo, or Result.failure with:
OAuth2ClientResult.Error.OidcEndpointsNotAvailableException if endpoints cannot be resolved.
OAuth2ClientResult.Error.HttpResponseException if the server returns an error.
IdTokenValidator.Error if ID token validation fails.
Other exceptions for network or parsing failures.
Parameters
the refresh token string.
See also
for an overload that accepts additional request parameters.
Attempt to refresh a token using the provided refresh token string, forwarding additional form body parameters to the token endpoint.
Reserved keys (grant_type, client_id, refresh_token) are silently filtered out of extraRequestParameters and cannot be overridden.
On success, a TokenRefreshedEvent is emitted on events.
Return
Result.success with the new TokenInfo, or Result.failure with:
OAuth2ClientResult.Error.OidcEndpointsNotAvailableException if endpoints cannot be resolved.
OAuth2ClientResult.Error.HttpResponseException if the server returns an error.
IdTokenValidator.Error if ID token validation fails.
Other exceptions for network or parsing failures.
Parameters
the refresh token string.
additional form parameters to include in the token request (e.g., mapOf("acr_values" to "urn:okta:loa:2fa:any")).