refreshAccessToken
About this command
Obtain a new AuthToken
once your access token has expired.
For more on refresh tokens, check out the Refresh Tokens page. |
Examples
import com.reach5.identity.sdk.core.models.AuthToken
val authToken: AuthToken = // The authentication token obtained from login or signup.
client.refreshAccessToken(
authToken = authToken,
success = { authToken -> ... }, // Get a new authentication token
failure = { error -> ... } // Handle a ReachFive error
)
Parameters
Authorization token of the profile retrieved from login.
|
|||||||||||||
Callback called once token refresh has succeeded. You’ll get an |
|||||||||||||
Callback called once the request has failed. You’ll get a |
Response
Type: Unit
AuthToken
The authentication token.
idToken |
The ID token JSON Web Token (JWT) that contains the profile’s information. |
||||||||||||||||||||||||||||||||||
accessToken |
The authorization credential JSON Web Token (JWT) used to access the ReachFive API. |
||||||||||||||||||||||||||||||||||
refreshToken |
The refresh token JSON Web Token (JWT) used to obtain new access tokens once they expire. |
||||||||||||||||||||||||||||||||||
tokenType |
The type of token. Always equal to |
||||||||||||||||||||||||||||||||||
expiresIn |
The lifetime in seconds of the access token. If |
||||||||||||||||||||||||||||||||||
user OpenIDUser |
The user’s information contained in the ID token.
|
ReachFiveError
message |
The message of the error. |
||||||||||||||
getErrorCode() |
The error code’s enumeration value. |
||||||||||||||
code |
The HTTP status code or SDK error code. |
||||||||||||||
exception |
The stack trace of the error. |
||||||||||||||
data |
Additional data about the error.
|