exchangeCodeForToken
client.exchangeCodeForToken(authorizationCode, success, failure)
About this command
Exchange an authorization code for an access token.
| This method is set to be deprecated. All SDK flows should be fully handled by the client. If you are using this method for a custom implementation, please contact your account’s support representative so that we may assist you accordingly. |
Examples
client.exchangeCodeForToken(
authorizationCode = "Azc6229cee...",
success = { authToken -> ...}, // Get the profile's authentication token
failure = { error -> ... } // Handle a ReachFive error
)
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. |
||||||||||||||||||||||||||||||||||
The step up token used to continue the step up flow and validate the user for authentication purposes. This only applies for MFA flows. |
|||||||||||||||||||||||||||||||||||
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. See Android SDK errors for more details. |
||||||||||||||
exception |
The stack trace of the error. |
||||||||||||||
data |
Additional data about the error.
|