- manages users
- registers
- authorizes
- autenticates
- distributes tokens
- aclResolver(aclObject, [groupTree], [glue]) ⇒
Map.<string, Set.<string>>
- Group :
Object
Kind: global class
- AuthService
- new AuthService(getUserByIdFn, [tokenStorage], [options], [appsProvider])
- .expressMiddleware() ⇒
function
- .createUserToken(userId, domain) ⇒
Promise.<Object>
- .createPasswordResetToken(userId) ⇒
Promise
- .getAndRemovePasswordResetToken(token) ⇒
Promise.<(Object|null)>
- .createToken(type, [userIdOrGroups], [options], [length]) ⇒
Promise
- .getToken(type, token) ⇒
Promise.<(Object|null)>
- .dropToken(token) ⇒
Promise
- .createUserAccessor([userGroups], [userId]) ⇒
UserAccessor
Creates an instance of AuthService
Param | Type | Default |
---|---|---|
getUserByIdFn | function |
|
[tokenStorage] | TokenStorage |
|
[options] | Object |
{} |
options.acl | Object |
|
options.groups | Object |
|
options.tokenFactory | function |
|
[options.passwordReset] | Object |
|
[options.passwordReset.tokenExpiresInMinutes] | number |
|
options.superGroup | string |
|
options.adminGroups | Array.<string> |
|
[options.cookieKey] | string |
|
[options.signed] | boolean |
|
[options.tokenType] | string |
|
[appsProvider] | Map.<string, (Object|Promise.<Object>)> |
new Map() |
Kind: instance method of AuthService
Kind: instance method of AuthService
Param | Default |
---|---|
userId | |
domain |
|
Kind: instance method of AuthService
Param | Type |
---|---|
userId | string |
Kind: instance method of AuthService
Param | Type |
---|---|
token | string |
Kind: instance method of AuthService
Param | Type | Default |
---|---|---|
type | string |
|
[userIdOrGroups] | string |
null |
[options] | Object |
|
[length] | number |
Kind: instance method of AuthService
Param | Type |
---|---|
type | string |
token | string |
Kind: instance method of AuthService
Param | Type |
---|---|
token | string |
authService.createUserAccessor([userGroups], [userId]) ⇒ UserAccessor
Kind: instance method of AuthService
Param | Type | Default |
---|---|---|
[userGroups] | Array.<Group> |
[] |
[userId] | string |
null |
Creates an instance of Authorizator.
Param | Type |
---|---|
aclList | Map.<String, Set.<String>> |
[superGroup] | string |
Kind: global class
- UsersService
- new UsersService(userStorage, [config], [formatter])
- .storage :
MongoDbUserStorage
Param | Type | Description |
---|---|---|
userStorage | * |
|
[config] | Object |
|
[config.superGroup] | string |
|
[config.adminGroups] | Array.<string> |
|
[formatter] | function |
user formatter |
Kind: instance property of UsersService
Kind: global class
Param | Type | Default |
---|---|---|
userGroups | Array.<Group> |
|
[byUserId] | string |
null |
[superGroup] | string |
null |
[adminGroups] | Array.<string> |
|
Kind: instance method of UserAccessor
Param | Type | Default |
---|---|---|
[userGroups] | Array.<Group> |
|
[byUserId] | string |
null |
Kind: instance method of UserAccessor
Param | Type |
---|---|
[userId] | string |
Kind: instance method of UserAccessor
Param | Type |
---|---|
groups | Array.<Group> |
Kind: instance method of UserAccessor
Param | Type |
---|---|
groups | Array.<Group> |
userAccessor.filterGroups(groupList, personId, [justManageable]) ⇒ Array.<Group>
Kind: instance method of UserAccessor
Param | Type | Default |
---|---|---|
groupList | Array.<Group> |
|
personId | string |
|
[justManageable] | boolean |
false |
Kind: global function
Param | Type | Default |
---|---|---|
aclObject | any |
|
[groupTree] | any |
|
[glue] | string |
"'.'" |
Kind: global typedef Properties
Name | Type |
---|---|
group | string |
domain | string |