Options
Menu

Class IdentityService

Provides a suite of utilities for looking up users and groups in the current domain.

See some common use cases in the developer guide.

Note that users and groups cannot (yet) be managed through this service. See the REST API for domain user and group management.

This service can be accessed using ConvergenceDomain.identity.

Hierarchy

  • IdentityService

Index

Methods

group

  • Looks up a single user group by ID. Rejects the promise if no group by the provided ID exists.

    Parameters

    • id: string

      the user group's ID

    Returns Promise<UserGroup>

    a promise to be resolved if the group exists, otherwise a rejection

groups

  • groups(ids: string[]): Promise<UserGroup[]>
  • Looks up one or more User Groups by their User Group Ids. Each returned User Group will contain the details of the User Group, including an array of users ids for those users that are members of the group.

    Note: that if any of the provided User Group Ids does not exist, the promise will be rejected.

    Parameters

    • ids: string[]

      An array of UserGroup Id's for the groups to get.

    Returns Promise<UserGroup[]>

    A promise resolved with an array of UserGroups that positionally correspond to the supplied User Group Id's.

groupsForUser

  • groupsForUser(username: string): Promise<string[]>
  • Looks up the groups to which the provided user belongs.

    Parameters

    • username: string

      an existing user's username

    Returns Promise<string[]>

    a promise to be resolved with an array of group IDs to which the given user belongs

groupsForUsers

  • groupsForUsers(usernames: string[]): Promise<{}>
  • Looks up the groups to which the provided users belong.

    Parameters

    • usernames: string[]

      an array of usernames

    Returns Promise<{}>

    a promise to be resolved with an array of group IDs to which the given user belongs

profile

  • Returns a promise that resolves with some information about the current user.

    Returns Promise<DomainUser>

    a promise to be resolved with the current user's information

search

  • Searches for DomainUsers based on the provided query configuration.

    Parameters

    • query: UserQuery

      a query configuration including the actual query and fields to search on

    Returns Promise<DomainUser[]>

    A promise to be resolved with an array of users, or an empty array if there are no matches

session

user

userExists

users

  • Looks up multiple users at once by username or DomainUserId.

    Parameters

    Returns Promise<DomainUser[]>

    a promise which will be resolved with an array of length equal to users, with a DomainUser or undefined for each user query