Options
All
  • Public
  • Public/Protected
  • All
Menu

Class WaveAuth

A WaveAuth presents a WaveCode to a user; the user can then scan the WaveCode with their device to authenticate. The user is unknown until the authentication is complete.

It is useful for logging in, as it provides a frictionless experience where the user can initiate and complete the authentication entirely on their device.

To start the process, use Service.WaveAuth. To deserialize an authentication, use Service.deserializeWaveAuth.

export
class

WaveAuth

Hierarchy

Index

Properties

WaveCodeUrl

WaveCodeUrl: string

The URL of the WaveCode to display for this authentication.

Protected assertionUrl

assertionUrl: string

The URL from which the authentication assertion can be retrieved.

Protected authChallenge

authChallenge: Buffer

The challenge posed to the device to solve.

Protected authLevel

authLevel: number

The authentication level for this authentication.

initiatorUrl

initiatorUrl: string

The URL of the direct authentication initiator to be clicked on by the client.

logId

logId: string

The log identifier for this enrolment.

Protected service

service: Service

The service this enrolment session originated from.

statusUrl

statusUrl: string

The URL for the short-poll status of the authentication, so that a client can query it.

Protected verifyAuthUrl

verifyAuthUrl: string | undefined

The URL used to notify the app that an authentication has completed.

Methods

authenticate

  • Returns the result of the authentication. This is a blocking method. If non-blocking behaviour is desired, short-poll WaveAuth.getState and call this method once the status is AuthenticationState.Done.

    memberof

    Authentication

    Parameters

    • Default value autoAccept: boolean = true
    • Optional payload: PayloadRequest

      Optional payload request. For more information, consult the documentation for PayloadRequest.

    Returns Promise<AuthenticationResult>

equals

  • Compares two authentications for equality.

    memberof

    WaveAuth

    Parameters

    • b: WaveAuth

      The authentication to compare against.

    Returns boolean

getState

  • Retrieves the current status of the authentication. Facilitates a non-blocking alternative workflow for Service.WaveAuth. Prior to calling WaveAuth.authenticate which blocks awaiting the user, this can be called to immediately return the current state of the authentication.

    memberof

    WaveAuth

    Returns Promise<AuthenticationState>

getStatus

serialize

  • serialize(): Buffer
  • Serializes this authentication session to a buffer.

    memberof

    WaveAuth

    Returns Buffer

Generated using TypeDoc