Session Data

The data below describes how the user record is saved in session after the user is logged in.



Field NameTypeDescription
_idMongo IDMongo Record ID
usernameStringThe UserName
firstNameStringThe User First Name
lastNameStringThe User Last Name
emailStringThe User Email
statusStringThe User Status.
profileObjectAdditional User Info.
socialLoginObjectInformation pertaining to login integration with social platforms. 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.

strategyStringThe social platform name. facebook, google, twitter, etc

idStringThe id of the user at the social platform

accessTokenStringAn access token that can be used to validate if the social user account is still valid
configObject


Field NameTypeMandatoryUniqueIndexedDescription
keysObjectYESNONO Overridden ACL Keys
packagesObjectNONONO Overridden ACL Packages
tenantObject


Field NameTypeMandatoryUniqueIndexedDescription
idStringYESNONOTenant ID
codeStringYESNONOTenant Code 
groupsArrayArray Of Group Codes
tsTime stamprecord created timestamp


Sample


User Record Sample
var data = {
   "_id": ObjectId('54ee1a511856706c23639308'),
   "username": "owner",
   "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"
   }
}