Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FRUI

Orchestrates the flow through an authentication tree using FRAuth, generating a handler for each step using the default or provided handler factory.

Example:

const ui = new forgerock.FRUI();
const result = await ui.getSession();

Hierarchy

  • Dispatcher
    • FRUI

Index

Constructors

constructor

Methods

addEventListener

  • addEventListener(type: string, listener: Listener): void
  • Subscribes to an event type.

    Parameters

    • type: string

      The event type

    • listener: Listener

      The function to subscribe to events of this type

    Returns void

clearEventListeners

  • clearEventListeners(type?: undefined | string): void
  • Unsubscribes all listener functions to a single event type or all event types.

    Parameters

    • Optional type: undefined | string

      The event type, or all event types if not specified

    Returns void

clearState

  • clearState(): FRUI
  • Reserved for future use. Returns the current instance of FRUI for chaining.

    Returns FRUI

dispatchEvent

  • dispatchEvent<T>(event: T): void
  • Publishes an event.

    Type parameters

    Parameters

    • event: T

      The event object to publish

    Returns void

getSession

  • Completes an authentication tree and returns the success or failure response.

    Parameters

    • Optional options: StepOptions

      Default configuration overrides

    Returns Promise<FREndStep>

removeEventListener

  • removeEventListener(type: string, listener: Listener): void
  • Unsubscribes from an event type.

    Parameters

    • type: string

      The event type

    • listener: Listener

      The function to unsubscribe from events of this type

    Returns void