UNPKG

asposewordscloud

Version:
31 lines (30 loc) 885 B
import request = require("request"); import { Configuration } from "./configuration"; /** * Authentication logic for api calls */ export interface IAuthentication { /** * Apply authentication settings to header and query params. */ applyToRequest(requestOptions: request.Options, configuration: Configuration): void; /** * Handle 401 response. */ handle401response(configuration: Configuration): any; } /** * Implements OAuth authentication */ export declare class OAuth implements IAuthentication { private accessToken; /** * Apply authentication settings to header and query params. */ applyToRequest(requestOptions: request.Options, configuration: Configuration): Promise<void>; /** * Handle 401 response. */ handle401response(configuration: Configuration): Promise<void>; private _requestToken; }