Authorization
Class used to authorize a mobile user against Oracle Mobile Cloud Enterprise.
Callers should use MobileBackend's authorization property.
Members
isAuthorized :Boolean
Returns true if a user has been authorized, false otherwise. A user can be authorized by calling authenticate() or authenticateAnonymous().
Type:
- Boolean
Methods
getAccessToken() → {String}
Returns the current access token from user credentials.
Returns:
current access token from user credentials.
- Type
- String
onAuthentication(callback)
Subscribe for on authentication event
Parameters:
Name | Type | Description |
---|---|---|
callback |
Authorization~OnAuthenticationCallback | The callback that will be called when authentication happen. |
Type Definitions
OnAuthenticationCallback(token)
The authentication callback.
This callback called when authentication happen.
Parameters:
Name | Type | Description |
---|---|---|
token |
String | The authentication token received from server. |