Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface InvalidAccessTokensCache

In-memory cache where invalid access tokens are stored.

Hierarchy

  • InvalidAccessTokensCache

Methods

Methods

get

  • get(accessToken: string): undefined | null | number
  • Get invalidation timestamp of the access token.

    Parameters

    • accessToken: string

      Access token.

    Returns undefined | null | number

    Invalidation timestamp or undefined if accessToken was not present in the cache.

has

  • has(accessToken: string): boolean
  • Check for access token existence in the cache.
    If found, it means access token is no longer valid.

    Parameters

    • accessToken: string

      Access token.

    Returns boolean

upset

  • upset(accessToken: string, invalidatedAt: null | number, ttl: number): void
  • Upset access token.

    Parameters

    • accessToken: string

      Access token that's no longer valid.

    • invalidatedAt: null | number

      Invalidation timestamp.

    • ttl: number

      How many seconds invalid access token should be kept in the cache.

    Returns void