users
This section covers the User class, for managing account attributes and authentication actions, and the User Finder class, for looking up users by email.
This section covers the User class, for managing account attributes and authentication actions, and the User Finder class, for looking up users by email.
This class represents a user in the OpenGate North API and provides methods to manage authentication, credentials, and account attributes.
Constructor
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| ogapi | InternalOpenGateAPI |
❌ | Reference to the API object. |
This invoke a request to OpenGate North API and the callback is managed by promises This function updates a apiKey of a user
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| apiKey | String |
❌ | required field |
Tipo: Promise
This invoke a request to OpenGate North API and the callback is managed by promises This function updates a password of a user
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| newPassword | String |
❌ | required field |
Tipo: Promise
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)
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
String |
❌ | required field | |
| password | String |
❌ | required field |
| twoFaCode | String |
❌ | optional field |
Tipo: Promise
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
Tipo: 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
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| newPassword | String |
❌ | required field |
| tokenId | String |
❌ | required field |
Tipo: Promise
Set the 2FaType attribute
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| twoFaType | string |
❌ | required field |
Tipo: User
Set the apiKey attribute. Only on update user
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| apiKey | string |
❌ | required field |
Tipo: User
Set the countryCode attribute
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| countryCode | string |
❌ | required field |
Tipo: User
Set the description attribute
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| description | string |
❌ | required field |
Tipo: User
Set the domain attribute
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| domain | string |
❌ | required field |
Tipo: User
Set the email attribute
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
string |
❌ | required field |
Tipo: User
Set the forcePasswordChange: if true Forces you to reset your password on your next login attempt.
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| forcePasswordChange | boolean |
❌ |
Tipo: User
Set the langCode attribute
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| langCode | string |
❌ | required field |
Tipo: User
Enable or disable login with password
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| loginWithPassword | boolean |
❌ |
Tipo: User
Set the name attribute
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| name | string |
❌ | required field |
Tipo: User
Set the password attribute
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| password | string |
❌ | required field |
Tipo: User
Set the profile attribute
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| profile | string |
❌ | required field |
Tipo: User
Set the surname attribute
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| surname | string |
❌ | required field |
Tipo: User
Set the timezone attribute
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| timezone | string |
❌ | required field |
Tipo: User
Set the workgroup attribute
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| workgroup | string |
❌ | required field |
Tipo: User
This class performs GET requests against the user resource in the OpenGate North API.
Constructor
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
| ogapi | InternalOpenGateAPI |
❌ | Reference to the API object. |
Find a specify user by a email. This execute a GET http method
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
string |
❌ | Email of the user. |
Tipo: Promise
Find a specific user with apiKey by a email and password. This execute a GET http method
| Nombre | Tipo | Opcional | Descripción |
|---|---|---|---|
string |
❌ | Email of the user. | |
| password | string |
❌ | password of the user. |
Tipo: Promise