Service class for managing authentication related operations.

Hierarchy

  • ApiService
    • AuthenticationService

Methods

  • Sends a challenge via a secure communication mechanism as part of the ongoing Embedded or Hybrid SCA process.

    Parameters

    Returns Promise<ScaAuthenticationEventChallengeEmbeddedHybridResponse>

    A Promise that resolves to the SCA authentication event challenge response.

    Throws

    If the HTTP request fails.

    Example

    // Example usage:
    authenticationService.sendScaChallenge(eventId, request)
    .then((response) => {
    console.log(response);
    })
    .catch((error) => {
    console.error(`Error sending SCA challenge.`);
    });
  • Submits an Embedded or Hybrid authentication attempt for a Strong Customer Authentication (SCA) event.

    Parameters

    Returns Promise<ScaAuthenticationEventAttemptEmbeddedHybridResponse>

    A Promise that resolves to the SCA authentication event attempt response.

    Throws

    If the HTTP request fails.

    Example

    // Example usage:
    authenticationService.submitScaAttempt(eventId, request)
    .then((response) => {
    console.log(response);
    })
    .catch((error) => {
    console.error(`Error submitting SCA attempt.`);
    });
  • Retrieves the singleton instance of the AuthenticationService class.

    Returns AuthenticationService

    The singleton instance of the AuthenticationService class.

    Function

    Static

    Example

    // Usage:
    const authenticationService = AuthenticationService.getInstance();