User Record
...
The data below describes how the user record is saved in session after the user is logged in.
| Field Name | Type | Mandatory | Unique | Indexed | Description |
---|
_id | Mongo ID | YES | YES | YES | Mongo Record ID |
username | StringYES | YES | YES | The UserName |
password | Hash | YES | NO | NO | The User Password |
firstName | String | YES | NO | NO | The User First Name |
lastName | String | YES | NO | NO | The User Last Name |
email | String | YES | YES | YES | The User Email |
status | String | YES | NO | NO | The User Status pendingJoin or active. |
profile | Object | NO | NO | NO | Additional User Info. |
socialLogin | ObjectNO | NO | NO | Information pertaining to login integration with social platforms | %strategy% | Object. Only available in case the user logged in with passport; and will contain only one object, which will be the current logged in social account. |
| strategy | String | The social platform name. facebook, google, twitter, etc |
| id | String | YES | YES | YES | The id of the user at the social platform |
| accessToken | String | NO | YES | NO | An access token that can be used to to validate if the social user account is still valid |
config | Object | NO | NO | NO |
|
|
| Field Name | Type | Mandatory | Unique | Indexed | Description |
---|
keys | Object | YES | NO | NO | Overridden ACL Keys | packages | Object | NO | NO | NO | Overridden ACL Packages |
|
tenant | Object | YES | NO | NO |
|
|
| Field Name | Type | Mandatory | Unique | Indexed | Description |
---|
id | String | YES | NO | NO | Tenant ID | code | String | YES | NO | NO | Tenant Code |
|
groups | Array | YES | NO | NO | Array Of Group Codes |
ts | Time stampYES | NO | NO | record created timestamp |
Sample
...
Code Block |
---|
language | js |
---|
title | User Record Sample |
---|
|
var data = {
"_id": ObjectId('57063608622c47b5c097d19b54ee1a511856706c23639308'),
"locked": true,
"username": "owner",
"password": "$2a$04$GfQ/6TJX82HcCoq8z8R44uN6x38hmJVIh7sKXIxknjt9UjN/f90sy",
"firstName": "owner",
"lastName": "owner",
"email": "owner@soajs.org",
"ts": 1460024840683,
"status": "active",
"profile": {},
"socialLogin": {
"strategy": "facebook":,
{ "id": "10153921831136546",
"accessToken": "EAAEtfZBue5g4BAHxZC795RjLBHzM044Rd1lqJDMUzj1FNDkZD"
}
},
"groups": [
"owner"
],
"config": {
"packages": {},
"keys": {}
},
"tenant": {
"id": "5551aca9e179c39b760f7a1a",
"code": "DBTN"
}
} |