Documentation - v0.29.1
    Preparing search index...

    Class PostgresAuthKeysRepository

    Implements

    Index

    Constructors

    Properties

    Methods

    • Given the DC id, idx and point in time (in seconds), return the temp_auth_key that should be used for the next request (such that now < key.expires), or null if no such key exists

      Parameters

      • dc: number
      • idx: number
      • now: number

      Returns Promise<Uint8Array<ArrayBufferLike> | null>

    • Store auth_key for the given DC

      If key is null, the key should be deleted instead

      MUST be applied immediately, without batching

      Parameters

      • dc: number
      • key: Uint8Array<ArrayBufferLike> | null

      Returns Promise<void>

    • Store temp_auth_key for the given DC and idx, along with its expiration date (in seconds)

      If key is null, the key should be deleted instead

      MUST be applied immediately, without batching

      Parameters

      • dc: number
      • idx: number
      • key: Uint8Array<ArrayBufferLike> | null
      • expires: number

      Returns Promise<void>