Reference Source
public class | source

AuthLoadingModel

Extends:

* → AuthLoadingModel

Class for the AuthLoading model to be used by the AuthLoadingPresenter

Constructor Summary

Public Constructor
public

Creates an instance of AuthLoadingModel and creates an observerlist.

Member Summary

Public Members
public

Method Summary

Public Methods
public

async checkAuthenticationState(onComplete: Function)

Check the authentication state of the user.

public

Default stub for unsubscribe function.

public

logout(onSuccess: Function, onFailure: Function)

Tries to log out of the database and remove all stored keys.

Public Constructors

public constructor() source

Creates an instance of AuthLoadingModel and creates an observerlist.

Public Members

public unsubscribeAuthListener: * source

Public Methods

public async checkAuthenticationState(onComplete: Function) source

Check the authentication state of the user.

Params:

NameTypeAttributeDescription
onComplete Function

A callback function to call when authentication has completed

public defaultUnsubscribe() source

Default stub for unsubscribe function.

public logout(onSuccess: Function, onFailure: Function) source

Tries to log out of the database and remove all stored keys.

Params:

NameTypeAttributeDescription
onSuccess Function

A callback function on a successful logout

onFailure Function

A callback function on a failure to logout