Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FRAuth

Provides access to the OpenAM authentication tree API.

Hierarchy

  • FRAuth

Index

Properties

Static Readonly previousStepKey

previousStepKey: "FRAuth_PreviousStep" = "FRAuth_PreviousStep"

Methods

Static next

  • Requests the next step in the authentication tree.

    Call FRAuth.next() recursively. At each step, check for session token or error, otherwise populate the step's callbacks and call next() again.

    Example:

    async function nextStep(previousStep) {
      const thisStep = await FRAuth.next(previousStep);
    
      switch (thisStep.type) {
        case StepType.LoginSuccess:
          const token = thisStep.getSessionToken();
          break;
        case StepType.LoginFailure:
          const detail = thisStep.getDetail();
          break;
        case StepType.Step:
          // Populate `thisStep` callbacks here, and then continue
          thisStep.setInputValue('foo');
          nextStep(thisStep);
          break;
      }
    }

    Parameters

    • Optional previousStep: FRStep

      The previous step with its callback values populated

    • Optional options: StepOptions

      Configuration overrides

    Returns Promise<FRStep | FRLoginSuccess | FRLoginFailure>

    The next step in the authentication tree

Static redirect

  • redirect(step: FRStep): void
  • Redirects to the URL identified in the RedirectCallback and saves the full step information to localStorage for retrieval when user returns from login.

    Example:

    forgerock.FRAuth.redirect(step);

    Parameters

    Returns void

Static resume

Static start