1 | /**
|
2 | * -------------------------------------------------------------------------------------------
|
3 | * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
|
4 | * See License in the project root for license information.
|
5 | * -------------------------------------------------------------------------------------------
|
6 | */
|
7 | import { TokenCredential } from "@azure/identity";
|
8 | import { AuthenticationProvider } from "../../IAuthenticationProvider";
|
9 | import { TokenCredentialAuthenticationProviderOptions } from "./ITokenCredentialAuthenticationProviderOptions";
|
10 | /**
|
11 | * @module TokenCredentialAuthenticationProvider
|
12 | */
|
13 | /**
|
14 | * @class
|
15 | * Class representing TokenCredentialAuthenticationProvider
|
16 | * This feature is introduced in Version 3.0.0
|
17 | * @extends AuthenticationProvider
|
18 | * Reference - https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/README.md
|
19 | */
|
20 | export declare class TokenCredentialAuthenticationProvider implements AuthenticationProvider {
|
21 | /**
|
22 | * @private
|
23 | * A member holding an instance of @azure/identity TokenCredential
|
24 | */
|
25 | private tokenCredential;
|
26 | /**
|
27 | * @private
|
28 | * A member holding an instance of TokenCredentialAuthenticationProviderOptions
|
29 | */
|
30 | private authenticationProviderOptions;
|
31 | /**
|
32 | * @public
|
33 | * @constructor
|
34 | * Creates an instance of TokenCredentialAuthenticationProvider
|
35 | * @param {TokenCredential} tokenCredential - An instance of @azure/identity TokenCredential
|
36 | * @param {TokenCredentialAuthenticationProviderOptions} authenticationProviderOptions - An instance of TokenCredentialAuthenticationProviderOptions
|
37 | * @returns An instance of TokenCredentialAuthenticationProvider
|
38 | */
|
39 | constructor(tokenCredential: TokenCredential, authenticationProviderOptions: TokenCredentialAuthenticationProviderOptions);
|
40 | /**
|
41 | * @public
|
42 | * @async
|
43 | * To get the access token
|
44 | * @param {TokenCredentialAuthenticationProviderOptions} authenticationProviderOptions - The authentication provider options object
|
45 | * The promise that resolves to an access token
|
46 | */
|
47 | getAccessToken(): Promise<string>;
|
48 | }
|