@ibm-cloud/cloudant - v0.12.6
    Preparing search index...

    Class CouchdbSessionAuthenticator

    The CouchdbSessionAuthenticator is used to get CouchDB session authentication information to requests.

    CouchDB Session Authenticator stores Authentication data in a Cookie Jar and that will be used during a request. The following token information are stored in the CookieJar.

    Cookie-Content: AuthSession=<sessionToken>; Expires=<expirationDate>; Max-Age=<refreshmentTimeInSeconds>
                    Version=1; Path=/; HttpOnly; Secure
    

    Hierarchy

    • Authenticator
      • CouchdbSessionAuthenticator
    Index

    Constructors

    Properties

    requiredOptions: ["username", "password"]
    tokenManager: SessionTokenManager
    AUTHTYPE_COUCHDB_SESSION: "COUCHDB_SESSION" = 'COUCHDB_SESSION'

    Methods

    • Acquire a session token that will be stored in a Cookie Jar. The same jar will be in use in the request.

      Parameters

      • requestOptions: object

        The request to augment with authentication information.

      Returns Promise<void>

    • Returns the authenticator's type ('COUCHDB_SESSION').

      Returns string

      a string that indicates the authenticator's type

    • Configure the TokenManager to use all the request settings together with the basic credentials.

      Parameters

      • userOptions: UserOptions

        Configuration values for a request service.

      Returns void