Interface representing a web core service.

interface WebCoreService {
    getSavedToken(): Promise<{
        [key: string]: string;
    }>;
    isAuthenticated(): Promise<boolean>;
    logout(): Promise<void>;
    setUseXLemonIdentity(use): void;
}

Implemented by

Methods

  • Gets the saved token.

    Returns Promise<{
        [key: string]: string;
    }>

    • A promise that resolves to an object containing the saved token.
  • Checks if the user is authenticated.

    Returns Promise<boolean>

    • A promise that resolves to true if the user is authenticated, false otherwise.
  • Logs out the user.

    Returns Promise<void>

    • A promise that resolves when the user is logged out.
  • Sets the use of X-Lemon-Identity.

    Parameters

    • use: boolean

      Whether to use X-Lemon-Identity.

    Returns void