LoginModel
Extends:
Class for the login model to be used by the LoginPresenter and SignupPresenter
Constructor Summary
| Public Constructor | ||
| public |
Creates an instance of LoginModelCreates an observerlist. |
|
Member Summary
| Private Members | ||
| private |
_data: {"data": *} |
|
Method Summary
| Public Methods | ||
| public |
Returns the data from the model. |
|
| public |
Trigger the on reads for models by adding a new item to the Bike list |
|
| public |
async method for presenters to know if the username and password is existed in the database |
|
| public |
Request sign-in with Facebook. |
|
| public |
Request sign-in with Twitter. |
|
| Private Methods | ||
| private |
Function to call on a successful authentication of the user signing in to the database. |
|
| private |
_checkProfileImageExists(userID: string) Check if a profile image exists. |
|
Public Constructors
Private Members
private _data: {"data": *} source
Public Methods
public triggerOnReads() source
Trigger the on reads for models by adding a new item to the Bike list
public async update(newData: Object) source
async method for presenters to know if the username and password is existed in the database
Params:
| Name | Type | Attribute | Description |
| newData | Object | data including username and password. |
public updateF(onError: Function) source
Request sign-in with Facebook.
Params:
| Name | Type | Attribute | Description |
| onError | Function | Callback function to call if there is an error |
public updateT(onError: Function) source
Request sign-in with Twitter.
Params:
| Name | Type | Attribute | Description |
| onError | Function | Callback function to call if there is an error |
Private Methods
private _authenticationSuccess() source
Function to call on a successful authentication of the user signing in to the database.
Reference
Source
