mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
3.4 KiB
3.4 KiB
Title, Added, Status, Last reviewed
Title | Added | Status | Last reviewed |
---|---|---|---|
Identity user service | v3.0.0 | Active | 2019-01-09 |
Identity user service
Gets OAuth2 personal details and roles for users.
Class members
Methods
- getCurrentUserInfo():
IdentityUserModel
Gets the name and other basic details of the current user.- Returns
IdentityUserModel
- The user's details
- Returns
- getUserRoles(userId:
string
):Observable
<
IdentityRoleModel
[]>
Gets a list of roles for a user.- userId:
string
- ID of the user - Returns
Observable
<
IdentityRoleModel
[]>
- Array of role info objects
- userId:
- getUsers():
Observable
<
IdentityUserModel
[]>
Gets details for all users.- Returns
Observable
<
IdentityUserModel
[]>
- Array of user info objects
- Returns
- getUsersByRolesWithCurrentUser(roleNames:
string[]
):Promise
<
IdentityUserModel
[]>
Gets an array of users (including the current user) who have any of the roles in the supplied list.- roleNames:
string[]
- List of role names to look for - Returns
Promise
<
IdentityUserModel
[]>
- Array of user info objects
- roleNames:
- getUsersByRolesWithoutCurrentUser(roleNames:
string[]
):Promise
<
IdentityUserModel
[]>
Gets an array of users (not including the current user) who have any of the roles in the supplied list.- roleNames:
string[]
- List of role names to look for - Returns
Promise
<
IdentityUserModel
[]>
- Array of user info objects
- roleNames:
- getValueFromToken(key:
string
)
Gets a named value from the user access token.- key:
string
- Key name of the field to retrieve
- key:
Details
OAuth2 defines an access token (used when authenticating a user) and a number of authentication roles that the user can participate in (see this page for an introduction to OAuth2 and a description of the roles). You can use the Identity user service to access this information for users, including the current user.