Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ActivateAccountSessionRepository<Account>

Repository which holds temporary accounts that weren't activated yet.

Type parameters

Hierarchy

  • ActivateAccountSessionRepository

Methods

Methods

delete

  • delete(token: string): Promise<void>
  • Delete session.
    In case token doesn't exist, this needs to be shallowly ignored and operation will be considered successful.

    Parameters

    • token: string

      Activate account token.

    Returns Promise<void>

insert

  • insert(token: string, account: Account, ttl: number): Promise<void>
  • Insert session.

    throws

    {Error} When token exists already.

    Parameters

    • token: string

      Activate account token.

    • account: Account

      Account that needs to be activated.

    • ttl: number

      Session ttl in seconds.

    Returns Promise<void>

read

  • read(token: string): Promise<undefined | null | Account>
  • Read session.

    Parameters

    • token: string

      Activate account token.

    Returns Promise<undefined | null | Account>

    Account that needs to be activated or null when token was not found.