Options
All
  • Public
  • Public/Protected
  • All
Menu

UserService provides a few methods to authenticate users and return UserInfo. When creating a WebCollabServer, you should provide an implementation of the UserService. For example, if you're using a token-based SSO service, your UserService might look like:

const userService: UserService = {
async getUserByToken(token) {
return await validationTokenAndGetUserInfoFromSSO(token)
}
}

Hierarchy

  • UserService

Index

Methods

  • getUserByToken(token: string): Promise<UserInfo>
  • Get user information by the specified token.

    Parameters

    • token: string

      The token used to authenticate a user, e.g. a JWT token.

    Returns Promise<UserInfo>

    • If the token is valid, the user information will be returned. Otherwise an exception will be thrown.

Generated using TypeDoc