Class: AuthenticationFlow

(abstract) AuthenticationFlow

This is the base class for authentication flow object that represents a single authentication. This class implements basic functionality for any authentication flow such as login, logout, isAuthenticated. This class should not instantiated directly. Instance of its sub class can be obtained when the promise returned from init resolves.

Methods

(abstract) isAuthenticated(options) → {Promise.<boolean>}

Parameters:
Name Type Description
options AuthenticationFlow~IsAuthenticatedOptions

options to be used

Source:
Returns:

If the promise is rejected, the callback will receive and object of type AuthError

Type
Promise.<boolean>

(abstract) login() → {Promise.<AuthenticationFlow>}

Source:
Returns:

If the promise is rejected, the callback will receive and object of type AuthError

Type
Promise.<AuthenticationFlow>

(abstract) logout(purgeSettings) → {Promise.<AuthenticationFlow>}

Parameters:
Name Type Description
purgeSettings boolean

pass true to reset all saved information for this auth.

Source:
Returns:

If the promise is rejected, the callback will receive and object of type AuthError

Type
Promise.<AuthenticationFlow>

Type Definitions

IsAuthenticatedOptions

Option object to be used with AuthenticationFlow#isAuthenticated

Type:
  • Object
Properties:
Name Type Description
OAuthScope Array.<String>

OAuth scopes for which isAuthenticated should be checked. Applicable only for OAuth. Default is empty array.

refreshExpiredTokens boolean

Whether to refresh token or not. Applicable only for for OAuth. Defaults to true.

Source: