AbstractAuthenticationService

AbstractAuthenticationService ⇐ Abstract

Kind: global abstract class
Extends: Abstract
Service:

AbstractAuthenticationService()

Service which handles Authentication with provider’s user account.

login(…args) ⇒ Promise.<*>

Log in.

NB: Upon successful login, an event loggedIn will be emitted.

Kind: instance method of AbstractAuthenticationService
Returns: Promise.<*> - Opaque data returned by _login

ParamTypeDescription
...argsany

Any useful information passed down to _login

logout([force]) ⇒ Promise

Log out.

NB: Upon successful logout, an event loggedOut will be emitted (with data.logoutCalled === true)

Kind: instance method of AbstractAuthenticationService

ParamTypeDescription
[force]boolean

Flag to force sending a logout even if successful login hasn't been done before

invalidateLoginSync()

Invalidate login data.

NB: An event loggedOut will be emitted (with data.logoutCalled === false).

This method is synchronous.

Kind: instance method of AbstractAuthenticationService

getLoginArgs() ⇒ Array.<*> | null

Returns the login arguments or null if not logged in

Kind: instance method of AbstractAuthenticationService

getAuthOpaque() ⇒ * | null

Returns the opaque authentication data or null if not logged in

Kind: instance method of AbstractAuthenticationService

_login(…args) ⇒ Promise.<*>

Override with an implementation that performs a login challenge

Kind: instance abstract method of AbstractAuthenticationService
Returns: Promise.<*> - Opaque authentication data (e.g. token string)
Access: protected

ParamTypeDescription
...argsany

Arguments passed to login

_logout(loginArgs, authOpaque) ⇒ Promise

Implementation to logout the current connected account

Kind: instance abstract method of AbstractAuthenticationService
Access: protected

ParamTypeDescription
loginArgsArray.<*>

Original login arguments used to login

authOpaque*

Authentication opaque data originally returned by _login

loggedIn

Event when login is successful

Kind: static constant of AbstractAuthenticationService

Param
data.loginArgs
data.authOpaque

loggedOut

Event when logout is successful

Kind: static constant of AbstractAuthenticationService

Param
data.loginArgs
data.authOpaque