Welcome to the Alfresco Builder Network

Gets OAuth2 personal details and roles for users.

Class members

Methods

  • getCurrentUserInfo(): IdentityUserModel
    Gets the name and other basic details of the current user.
  • getUserRoles(userId: string): Observable<IdentityRoleModel[]>
    Gets a list of roles for a user.
  • getUsers(): Observable<IdentityUserModel[]>
    Gets details for all users.
  • getUsersByRolesWithCurrentUser(roleNames: string[]): Promise<IdentityUserModel[]>
    Gets an array of users (including the current user) who have any of the roles in the supplied list.
  • 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.
  • getValueFromToken(key: string)
    Gets a named value from the user access token.
    • key: string - Key name of the field to retrieve

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.

See also

Interested in trying Alfresco?

Try Now