Members
(constant) authorizations
'api/confirm-email-tokens' authorization list.
(constant) authorizations
'api/confirm-email-tokens' authorization list.
(constant) authorizations
'api/authorization-tokens' authorization list.
(constant) authorizations
'api/things' authorization list.
(constant) authorizations
'api/users' authorization list.
(constant) CONFIRM_EMAIL_TOKENS
URL Endpoint 'api/confirm-email-tokens'
(constant) CONFIRM_EMAIL_TOKENS
URL Endpoint 'api/confirm-email-tokens'
(constant) jwt
JWT strategy verifies that the token sent by the user is valid.
- Source:
(constant) local
Local strategy used to check supplied email and password against database.
- Source:
(constant) RESET_TOKENS
URL Endpoint 'api/authorization-tokens'.
(constant) sequelize
Sequelize instance to be referenced through the server
- Source:
server
Express server export for testing
(constant) server
Express server instance
(constant) THINGS
URL Endpoint 'api/things'.
(constant) USERS
URL Endpoint 'api/users'
Type Definitions
ConfirmEmailToken
Definition of the ResetToken database model
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
UserId |
Int | Foreign Key id. |
token |
String | 64bit random token. |
expiration |
Date | When the token expires. |
ResetToken
Definition of the ResetToken database model
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
UserId |
Int | Foreign Key id. |
token |
String | A JSON Web Token. |
expiration |
Date | When does the reset token expire. |
isUsed |
Boolean | Has the reset token already been used. |
Thing
Definition of the Thing database model
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
name |
String | Name of the Thing |
description |
String | Description of the Thing. |
price |
Decimal | The price of the Thing. |
- Source:
User
Definition of the User database model
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
firstName |
String | First name of the User. |
lastName |
String | Second name of the User |
fullName |
String | First and second name of the User. |
email |
String | Email address of the user. |
password |
String | Hashed password for the user to login with. |
salt |
String | Salt used to hash the password for the User. |
lastLogin |
Date | When was the last time the User logged in. |
status |
Enum | The status of the User account. |
role |
Enum | The role of the user has. |
isEmailConfirmed |
Boolean | Has the user confirmed there email address. |
- Source: