@jacraig/request
    Preparing search index...

    Interface AuthenticationProvider

    Authentication provider interface (used to authenticate requests)

    interface AuthenticationProvider {
        authenticate(request: Request): Promise<void>;
        authenticationFailed(request: Request, reason: Response): Promise<void>;
    }
    Index

    Methods

    • Authenticates the request (e.g. adds authentication headers) request: The request to authenticate Note: This method should reject the promise if the request cannot be authenticated.

      Parameters

      Returns Promise<void>

    • Called when the request fails with a 401 Unauthorized response request: The request that failed reason: The reason for the failure

      Parameters

      Returns Promise<void>