User
Extends:
This class allow make get request to user resource into Opengate North API.
Constructor Summary
| Public Constructor | ||
| public |
constructor(Reference: InternalOpenGateAPI) Constructor |
|
Method Summary
| Public Methods | ||
| public |
changeApiKey(apiKey: String): Promise This invoke a request to OpenGate North API and the callback is managed by promises This function updates a apiKey of a user |
|
| public |
changePassword(newPassword: String): Promise This invoke a request to OpenGate North API and the callback is managed by promises This function updates a password of a user |
|
| public |
generateApiKey(): * |
|
| public |
This invoke a request to OpenGate North API and the callback is managed by promises This function get a JWT for user with Two Factor Authorithation (optional) |
|
| public |
This invoke a request to OpenGate North API and the callback is managed by promises This function request for new password when the user forgets it. |
|
| public |
updatePassword(newPassword: String, tokenId: String): Promise This invoke a request to OpenGate North API and the callback is managed by promises This function updates a password of a user with a tokenId |
|
| public |
with2FaType(twoFaType: string): User Set the 2FaType attribute |
|
| public |
withApiKey(apiKey: string): User Set the apiKey attribute. |
|
| public |
withCountryCode(countryCode: string): User Set the countryCode attribute |
|
| public |
withDescription(description: string): User Set the description attribute |
|
| public |
withDomain(domain: string): User Set the domain attribute |
|
| public |
Set the email attribute |
|
| public |
withForcePasswordChange(forcePasswordChange: boolean): User Set the forcePasswordChange: if true Forces you to reset your password on your next login attempt. |
|
| public |
withLangCode(langCode: string): User Set the langCode attribute |
|
| public |
Set the name attribute |
|
| public |
withPassword(password: string): User Set the password attribute |
|
| public |
withProfile(profile: string): User Set the profile attribute |
|
| public |
withSurname(surname: string): User Set the surname attribute |
|
| public |
withTimezone(timezone: string): User Set the timezone attribute |
|
| public |
withWorkgroup(workgroup: string): User Set the workgroup attribute |
|
Inherited Summary
| From class BaseProvision | ||
| public |
This invoke a request to OpenGate North API and the callback is managed by promises This function create a entity of provision |
|
| public |
This invoke a request to OpenGate North API and the callback is managed by promises This function deletes a entity of provision |
|
| public |
This invoke a request to OpenGate North API and the callback is managed by promises This function updates a entity of provision |
|
Public Constructors
public constructor(Reference: InternalOpenGateAPI) source
Constructor
Override:
BaseProvision#constructorParams:
| Name | Type | Attribute | Description |
| Reference | InternalOpenGateAPI | to the API object. |
Public Methods
public changeApiKey(apiKey: String): Promise source
This invoke a request to OpenGate North API and the callback is managed by promises This function updates a apiKey of a user
Params:
| Name | Type | Attribute | Description |
| apiKey | String | required field |
Return:
| Promise |
Example:
ogapi.usersBuilder().withEmail(example@example.es).withPassword(oldPassword).changeApiKey(newPassword);
public changePassword(newPassword: String): Promise source
This invoke a request to OpenGate North API and the callback is managed by promises This function updates a password of a user
Params:
| Name | Type | Attribute | Description |
| newPassword | String | required field |
Return:
| Promise |
Example:
ogapi.usersBuilder().withEmail(example@example.es).withPassword(oldPassword).changePassword(newPassword);
public login(email: String, password: String, twoFaCode: String): Promise source
This invoke a request to OpenGate North API and the callback is managed by promises This function get a JWT for user with Two Factor Authorithation (optional)
Return:
| Promise |
Example:
ogapi.usersBuilder().login(email, password);
ogapi.usersBuilder().login(email, password, twoFaCode);
public requestResetPassword(): Promise source
This invoke a request to OpenGate North API and the callback is managed by promises This function request for new password when the user forgets it. Sends a password recovery email
Return:
| Promise |
Example:
ogapi.usersBuilder().withEmail(example@example.es).requestResetPassword()
public updatePassword(newPassword: String, tokenId: String): Promise source
This invoke a request to OpenGate North API and the callback is managed by promises This function updates a password of a user with a tokenId
Return:
| Promise |
Example:
ogapi.usersBuilder().withEmail(example@example.es).updatePassword(newPassword, tokenid);
public with2FaType(twoFaType: string): User source
Set the 2FaType attribute
Params:
| Name | Type | Attribute | Description |
| twoFaType | string | required field |
public withApiKey(apiKey: string): User source
Set the apiKey attribute. Only on update user
Params:
| Name | Type | Attribute | Description |
| apiKey | string | required field |
public withCountryCode(countryCode: string): User source
Set the countryCode attribute
Params:
| Name | Type | Attribute | Description |
| countryCode | string | required field |
public withDescription(description: string): User source
Set the description attribute
Params:
| Name | Type | Attribute | Description |
| description | string | required field |
public withDomain(domain: string): User source
Set the domain attribute
Params:
| Name | Type | Attribute | Description |
| domain | string | required field |
public withEmail(email: string): User source
Set the email attribute
Params:
| Name | Type | Attribute | Description |
| string | required field |
public withForcePasswordChange(forcePasswordChange: boolean): User source
Set the forcePasswordChange: if true Forces you to reset your password on your next login attempt.
Params:
| Name | Type | Attribute | Description |
| forcePasswordChange | boolean |
public withLangCode(langCode: string): User source
Set the langCode attribute
Params:
| Name | Type | Attribute | Description |
| langCode | string | required field |
public withName(name: string): User source
Set the name attribute
Params:
| Name | Type | Attribute | Description |
| name | string | required field |
public withPassword(password: string): User source
Set the password attribute
Params:
| Name | Type | Attribute | Description |
| password | string | required field |
public withProfile(profile: string): User source
Set the profile attribute
Params:
| Name | Type | Attribute | Description |
| profile | string | required field |
public withSurname(surname: string): User source
Set the surname attribute
Params:
| Name | Type | Attribute | Description |
| surname | string | required field |