Authentication state.

interface Authentication {
    authenticated: boolean;
    getLoginDate(): Date;
    getName(): undefined | string;
    getUser(): undefined | User;
    isAuthenticated(): boolean;
    loginDate: Date;
    logout(): boolean | Promise<boolean>;
    name: undefined | string;
    readonly [key: string]: unknown;
}

Indexable

  • readonly [key: string]: unknown

    may have extra keys

Properties

authenticated: boolean

Please use the () method.

loginDate: Date

Please use the getLoginDate method.

name: undefined | string

Please use the getName method.

Methods

  • The date of the login.

    Returns Date

  • Gets the name of the User that this Authentication context was created for.

    Returns undefined | string

  • Gets the user instances associated with this authentication.

    Returns undefined | User

  • Current authentication state of this context.

    Returns boolean

  • Logs out the user instances associated with this authentication.

    Returns boolean | Promise<boolean>