Class: SSOAuthorization

SSOAuthorization


new SSOAuthorization()

Class used to authorize a mobile user against Oracle Mobile Cloud Service.

Class used to authorize a mobile user against Oracle Mobile Cloud Service. Callers should use MobileBackend's SSOAuthAuthorization() property. Derives from Authorization.
Source:

Methods


authenticate(successCallback, errorCallback)

Authenticates a user with the given credentials using federated single sign-on.

Authenticates a user with the given credentials using federated single sign-on. The user remains logged in until logout() is called. You must have SSO enabled for the mobile backend.
Parameters:
Name Type Argument Description
successCallback Authorization~authenticateSuccessCallback <optional>
Optional callback invoked on success (deprecated use promises instead).
errorCallback Authorization~errorCallback <optional>
Optional callback invoked on failure (deprecated use promises instead).
Source:
Returns:
Type
Promise.<(NetworkResponse|NetworkResponse)>

authenticateAnonymous(successCallback, errorCallback)

Authenticates an anonymous user against the service.

Authenticates an anonymous user against the service. The user remains logged in until logout() is called.
Parameters:
Name Type Argument Description
successCallback Authorization~authenticateSuccessCallback <optional>
Optional callback invoked on success (deprecated use promises instead).
errorCallback Authorization~errorCallback <optional>
Optional callback invoked on failure (deprecated use promises instead).
Source:
Returns:
Type
Promise.<(NetworkResponse|NetworkResponse)>

getClientId()

Returns the client ID for the current backend.

Returns the client ID for the current backend.
Source:

getClientSecret()

Returns the client secret for the current backend.

Returns the client secret for the current backend.
Source:

getTenantName()

Returns the tenant name for the current backend.

Returns the tenant name for the current backend.
Source:

isTokenValid()

Checks to see if the OAuth token is null,undefined,NaN,empty string (''),0,false and also checks the timestamp of when the token was first retrieved to see if it was still valid.

Checks to see if the OAuth token is null,undefined,NaN,empty string (''),0,false and also checks the timestamp of when the token was first retrieved to see if it was still valid.
Source:
Returns:
Type
Boolean

logout()

Logs out the current user and clears credentials and tokens and cookies.

Logs out the current user and clears credentials and tokens and cookies.
Source:

refreshToken(successCallback, errorCallback)

Refreshes the authentication token if it has expired.

Refreshes the authentication token if it has expired. The authentication scheme should support refresh.
Parameters:
Name Type Description
successCallback Authorization~authenticateSuccessCallback Optional callback invoked on success (deprecated use promises instead).
errorCallback Authorization~errorCallback Optional callback invoked on failure (deprecated use promises instead).
Source:
Returns:
Type
Promise.<(NetworkResponse|NetworkResponse)>

<inner> clearCookies()

Clears the current session cookies and logs out the user.

Clears the current session cookies and logs out the user.
Source:

<inner> IsInAppBrowserInstalled()

Checks to see if the correct plugin is installed into the application.

Checks to see if the correct plugin is installed into the application.
Source:
Returns:
Type
boolean