renewOAuth2Token

suspend fun renewOAuth2Token(url: String? = null, forceRefresh: Boolean? = null): OAuth2Token?

Renews the OAuth2 token for the given url.

Return

the new OAuth2Token if the token is successfully renewed, otherwise null.

Parameters

url

the URL for renewing the token, if null, the backend URL from SettingsProvider.get is used.

forceRefresh

if true, it will renew the refresh token and access token, otherwise it will only try to renew the access token.