UNPKG

957 BTypeScriptView Raw
1import { WebResourceLike } from "../webResource";
2import { ServiceClientCredentials } from "./serviceClientCredentials";
3/**
4 * A credentials object that uses a token string and a authorzation scheme to authenticate.
5 */
6export declare class TokenCredentials implements ServiceClientCredentials {
7 token: string;
8 authorizationScheme: string;
9 /**
10 * Creates a new TokenCredentials object.
11 *
12 * @constructor
13 * @param {string} token The token.
14 * @param {string} [authorizationScheme] The authorization scheme.
15 */
16 constructor(token: string, authorizationScheme?: string);
17 /**
18 * Signs a request with the Authentication header.
19 *
20 * @param {WebResourceLike} webResource The WebResourceLike to be signed.
21 * @return {Promise<WebResourceLike>} The signed request object.
22 */
23 signRequest(webResource: WebResourceLike): Promise<WebResourceLike>;
24}
25//# sourceMappingURL=tokenCredentials.d.ts.map
\No newline at end of file