IdentityAPI
Authentication API calls
Constructor Summary
| Public Constructor | ||
| public |
constructor(options: Object, useCookie: Boolean) |
|
Method Summary
| Public Methods | ||
| public |
externalRegister(idToken: string, type: string, options: Object): Promise Register external library user |
|
| public |
externalSession(idToken: string, type: string, options: Object): Promise Get external library user session |
|
| public |
getUserInfo(token: string, userData: Object, options: Object): Promise Get user info by token |
|
| public |
loginByEmail(email: string, password: string, options: Object): Object Login user using email address and password |
|
| public |
registerByEmail(user: Object, options: Object): Promise Register user by email address and password |
|
| public |
unauthenticate(token: string, nativeController: function, options: Object): Promise<Identity, Error> Unauthenticate user |
|
| public |
updateProfile(token: string, revisionId: number, userId: string, properties: Object, options: Object): Promise Update user profile properties |
|
Public Constructors
public constructor(options: Object, useCookie: Boolean) source
Params:
| Name | Type | Attribute | Description |
| options | Object |
|
Options |
| options.server | IdentityServer |
|
Server instance api methods are called on. |
| options.config | IdentityConfig |
|
Identity config object |
| useCookie | Boolean | Enable Identity Cookie module |
Public Methods
public externalRegister(idToken: string, type: string, options: Object): Promise source
Register external library user
public externalSession(idToken: string, type: string, options: Object): Promise source
Get external library user session
public getUserInfo(token: string, userData: Object, options: Object): Promise source
Get user info by token
public loginByEmail(email: string, password: string, options: Object): Object source
Login user using email address and password
public registerByEmail(user: Object, options: Object): Promise source
Register user by email address and password
Params:
| Name | Type | Attribute | Description |
| user | Object | User properties |
|
| user.mail | string | User email address |
|
| user.password | string | User password |
|
| user.userName | string |
|
User name |
| user.givenName | string |
|
User given name |
| user.sn | string |
|
User surname |
| user.termsAndConditionsAgreementDate | number |
|
Unix timestamp at which terms where agreed to |
| user.facebookId | string |
|
User Facebook id |
| options | Object | Additional options |
|
| options.headers | Object | additional headers to add to the call |
public unauthenticate(token: string, nativeController: function, options: Object): Promise<Identity, Error> source
Unauthenticate user
Manual
Reference
Source
Test
