Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Credentials

A class, representing the credentials used for authenticating a User.

Hierarchy

  • Credentials

Index

Methods

Static Custom

  • Custom(provider: string, token: string, userInfo?: any): Credentials
  • Creates Credentials based on a login with a custom system.

    see

    Realm Object Server docs for advanced custom authentication.

    Parameters

    • provider: string

      Provider used to verify the credentials.

    • token: string

      String identifying the user. Usually a username or user token.

    • Optional userInfo: any

      Data describing the user further or null if the user does not have any extra data. The data will be serialized to JSON, so all values must be mappable to a valid JSON data type.

    Returns Credentials

    An instance of Credentials that can be passed to User.authenticate.

Static admin

  • Creates Credentials based on an admin token. It's recommended that it is not used in production as the admin token is sensitive data that should ideally not leave the server.

    Parameters

    • adminToken: string

      The Admin token obtained from ROS.

    Returns Credentials

    An instance of Credentials that can be passed to User.authenticate.

Static anonymous

Static azureAD

Static facebook

Static google

Static jwt

Static usernamePassword

  • usernamePassword(username: string, password: string, createUser?: boolean): Credentials
  • Creates Credentials based on a login with a username and a password.

    Parameters

    • username: string

      The username of the user.

    • password: string

      The user's password.

    • Optional createUser: boolean

      A value indicating whether the user should be created.

    Returns Credentials

    An instance of Credentials that can be passed to User.authenticate.