User
Direct Subclass:
The User class is used to represent a single user on the Kinvey platform. Use the user class to manage the active user lifecycle and perform user operations.
Static Method Summary
Static Public Methods | ||
public static |
Connect a social identity. |
|
public static |
Check if a username already exists. |
|
public static |
forgotUsername(email: string, options: Object): Promise<Object> Request an email to be sent to recover a forgot username. |
|
public static |
getActiveUser(client: Client): User Gets the active user. |
|
public static |
Login using a username or password. |
|
public static |
loginWithMIC(redirectUri: string, authorizationGrant: AuthorizationGrant, options: Object): Promise<User> Login using Mobile Identity Connect. |
|
public static |
Logout the active user. |
|
public static |
Lookup users. |
|
public static |
Refresh the active user. |
|
public static |
|
|
public static |
Remove a user. |
|
public static |
resetPassword(username: string, options: Object): Promise<Object> Request an email to be sent to reset a users password. |
|
public static |
restore(): * Restore a user that has been suspended. |
|
public static |
Sign up a user with Kinvey. |
|
public static |
signupWithIdentity(identity: SocialIdentity | string, session: Object, options: Object): Promise<User> Sign up a user with Kinvey using an identity. |
|
public static |
|
|
public static |
Update the active user. |
|
public static |
verifyEmail(username: string, options: Object): Promise<Object> Request an email to be sent to verify the users email. |
Constructor Summary
Public Constructor | ||
public |
constructor(data: Object, options: Object): User Create a new instance of a User. |
Member Summary
Public Members | ||
public get |
The auth token for the user. |
|
public |
The users data. |
|
public get |
The email for the user. |
|
public get |
The metadata for the user. |
|
public get |
The username for the user. |
Method Summary
Public Methods | ||
public |
Connect a social identity. |
|
public |
Checks if the user is the active user. |
|
public |
Checks if the users email is verfified. |
|
public |
Login using a username or password. |
|
public |
loginWithMIC(redirectUri: string, authorizationGrant: AuthorizationGrant, options: Object): Promise<User> Login using Mobile Identity Connect. |
|
public |
Logout the active user. |
|
public |
Retfresh the users data. |
|
public |
|
|
public |
Sign up a user with Kinvey. |
|
public |
signupWithIdentity(identity: SocialIdentity | string, session: Object, options: Object): Promise<User> Sign up a user with Kinvey using an identity. |
|
public |
|
|
public |
Update the users data. |
Static Public Methods
public static connectIdentity(identity: string, session: Object, options: Object): Promise<User> source
Connect a social identity.
public static exists(username: string, options: Object): boolean source
Check if a username already exists.
public static forgotUsername(email: string, options: Object): Promise<Object> source
Request an email to be sent to recover a forgot username.
public static getActiveUser(client: Client): User source
Gets the active user. You can optionally provide a client to use to lookup the active user.
Params:
Name | Type | Attribute | Description |
client | Client |
|
Client to use to lookup active user. |
public static login(username: string | Object, password: string, options: Object): Promise<User> source
Login using a username or password.
public static loginWithMIC(redirectUri: string, authorizationGrant: AuthorizationGrant, options: Object): Promise<User> source
Login using Mobile Identity Connect.
Params:
Name | Type | Attribute | Description |
redirectUri | string | The redirect uri. |
|
authorizationGrant | AuthorizationGrant |
|
MIC authorization grant to use. |
options | Object |
|
Options |
public static logout(options: Object): Promise<User> source
Logout the active user.
Params:
Name | Type | Attribute | Description |
options | Object |
|
Options |
public static lookup(query: Query, options: Object): Observable source
Lookup users.
Return:
Observable | Observable. |
public static me(options: Object): Promise<User> source
Refresh the active user.
Params:
Name | Type | Attribute | Description |
options | Object |
|
Options |
public static resetPassword(username: string, options: Object): Promise<Object> source
Request an email to be sent to reset a users password.
public static signup(data: User | Object, options: Object): Promise<User> source
Sign up a user with Kinvey.
public static signupWithIdentity(identity: SocialIdentity | string, session: Object, options: Object): Promise<User> source
Sign up a user with Kinvey using an identity.
Public Constructors
Public Methods
public connectIdentity(identity: string, session: Object, options: Object): Promise<User> source
Connect a social identity.
public login(username: string | Object, password: string, options: Object): Promise<User> source
Login using a username or password.
public loginWithMIC(redirectUri: string, authorizationGrant: AuthorizationGrant, options: Object): Promise<User> source
Login using Mobile Identity Connect.
Params:
Name | Type | Attribute | Description |
redirectUri | string | The redirect uri. |
|
authorizationGrant | AuthorizationGrant |
|
MIC authorization grant to use. |
options | Object |
|
Options |
public logout(options: Object): Promise<User> source
Logout the active user.
Params:
Name | Type | Attribute | Description |
options | Object |
|
Options |
public me(options: Object): Promise<User> source
Retfresh the users data.
Params:
Name | Type | Attribute | Description |
options | Object |
|
Options |
public signup(data: User | ?Object, options: Object): Promise<User> source
Sign up a user with Kinvey.