Interface CookieStore

Used to generate and store cookies.

Hierarchy

  • CookieStore

Implemented by

Properties

Properties

delete: ((cookie) => Promise<boolean>)

Type declaration

    • (cookie): Promise<boolean>
    • Deletes the given cookie.

      Parameters

      • cookie: string

        Cookie to delete.

      Returns Promise<boolean>

generate: ((accountId) => Promise<string>)

Type declaration

    • (accountId): Promise<string>
    • Generates and stores a new cookie for the given accountId. This does not replace previously generated cookies.

      Parameters

      • accountId: string

        Account to create a cookie for.

      Returns Promise<string>

      The generated cookie.

get: ((cookie) => Promise<undefined | string>)

Type declaration

    • (cookie): Promise<undefined | string>
    • Return the accountID associated with the given cookie.

      Parameters

      • cookie: string

        Cookie to find the account for.

      Returns Promise<undefined | string>

refresh: ((cookie) => Promise<undefined | Date>)

Type declaration

    • (cookie): Promise<undefined | Date>
    • Refreshes the cookie expiration and returns when it will expire if the cookie exists.

      Parameters

      • cookie: string

        Cookie to refresh.

      Returns Promise<undefined | Date>