Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Authenticator

Log in to a remote authentication service, using an Online identity.

Hierarchy

  • Authenticator

Index

Properties

Readonly loginSupported

loginSupported: boolean

Returns true if authentication is avaiable and the login methods can be used, otherwise returns false. Currently, authentication is only available if Ditto was initialized with an identity of type 'online'.

Methods

loginWithToken

  • loginWithToken(token: string, options?: any): Promise<void>
  • Log in to Ditto with a third-party token. Throws if authentication is not available, which can be checked with loginSupported.

    Parameters

    • token: string

      the authentication token required to log in.

    • Optional options: any

    Returns Promise<void>

loginWithUsernameAndPassword

  • loginWithUsernameAndPassword(username: string, password: string, options?: any): Promise<void>
  • Log in to Ditto with a username and password. Throws if authentication is not available, which can be checked with loginSupported.

    Parameters

    • username: string

      the username component of the credentials used for log in.

    • password: string

      the password component of the credentials used for log in.

    • Optional options: any

    Returns Promise<void>