Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface AuthenticationSessionRepository

Repository which holds on going user authentication.

Hierarchy

  • AuthenticationSessionRepository

Methods

Methods

delete

  • delete(username: string, deviceId: string): Promise<void>
  • Delete on going user authentication session.
    In case session with username and deviceId doesn't exist, this needs to be shallowly ignored and operation will be considered successful.

    Parameters

    • username: string

      Account username.

    • deviceId: string

      Id of the device from where authentication is made.

    Returns Promise<void>

read

  • Read on going user authentication session.

    Parameters

    • username: string

      Account username.

    • deviceId: string

      Id of the device from where authentication is made.

    Returns Promise<undefined | null | AuthenticationSession>

    User authentication session or null when not found.

upsert

  • Insert/Replaces on going user authentication session.

    Parameters

    • username: string

      Account username.

    • deviceId: string

      Id of the device from where authentication is made.

    • session: AuthenticationSession

      User authentication session.

    • ttl: number

      Session ttl in seconds.
      In case session is already present, when replacing it, ttl needs to be reset too.

    Returns Promise<void>