Token Manager of CouchDB session token.

The Token Manager performs basic auth with username and password to acquire session tokens.

Hierarchy

  • TokenManager
    • SessionTokenManager

Constructors

Properties

requiredOptions: string[] = ...
tokenName: string

Methods

  • requestToken(): Promise<any>
  • Request a session token using basic credentials.

    Returns

    Returns Promise<any>

  • saveTokenInfo(tokenResponse: any): void
  • Private

    From the response parse and save session token into field accessToken. Calculate expiration and refresh time from the received response and store them in fields expireTime and refreshTime.

    Returns

    Parameters

    • tokenResponse: any

      Response object from session token request

    Returns void

  • setHeaders(headers: OutgoingHttpHeaders): void
  • Only base service specific headers are in use.

    Returns

    Parameters

    • headers: OutgoingHttpHeaders

      the new set of headers as an object

    Returns void

Generated using TypeDoc