Service class for managing trusted entities related operations.

Hierarchy

  • ApiService
    • TrustedEntitiesService

Methods

  • Creates a new trusted entity credential.

    Parameters

    Returns Promise<AuthTrustedEntityCredential>

    A promise that resolves to the created trusted entity credential.

    Throws

    If the HTTP request fails.

    Example

    // Example usage:
    trustedEntitiesService.createTrustedEntityCredential(request)
    .then((response) => {
    console.log(response);
    })
    .catch((error) => {
    console.error(`Error creating trusted entity credential.`);
    });
  • Deletes a trusted entity credential.

    Parameters

    Returns Promise<void>

    A promise that resolves when the trusted entity credential is successfully deleted.

    Throws

    If the HTTP request fails.

    Example

    // Example usage:
    trustedEntitiesService.deleteTrustedEntityCredential(request)
    .then(() => {
    console.log(`Trusted entity credential deleted successfully.`);
    })
    .catch((error) => {
    console.error(`Error deleting trusted entity credential.`);
    });
  • Retrieves a list of trusted entities by entity type.

    Parameters

    Returns Promise<AuthTrustedEntityCredential[]>

    A promise that resolves to a trusted entities list.

    Throws

    If the HTTP request fails.

    Example

    // Example usage:
    trustedEntitiesService.getTrustedEntityCredentials(entityType)
    .then((response) => {
    console.log(response);
    })
    .catch((error) => {
    console.error(`Error fetching trusted entities.`);
    });
  • Retrieves the singleton instance of the TrustedEntitiesService class.

    Returns TrustedEntitiesService

    The singleton instance of the TrustedEntitiesService class.

    Function

    Static

    Example

    // Usage:
    const trustedEntitiesService = TrustedEntitiesService.getInstance();