UNPKG

2.04 kBTypeScriptView Raw
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/**
8 * @module ImplicitMSALAuthenticationProvider
9 */
10import { UserAgentApplication } from "msal";
11import { AuthenticationProvider } from "./IAuthenticationProvider";
12import { AuthenticationProviderOptions } from "./IAuthenticationProviderOptions";
13import { MSALAuthenticationProviderOptions } from "./MSALAuthenticationProviderOptions";
14/**
15 * @class
16 * Class representing ImplicitMSALAuthenticationProvider
17 * @extends AuthenticationProvider
18 */
19export declare class ImplicitMSALAuthenticationProvider implements AuthenticationProvider {
20 /**
21 * @private
22 * A member holding an instance of MSALAuthenticationProviderOptions
23 */
24 private options;
25 /**
26 * @private
27 * A member holding an instance of MSAL UserAgentApplication
28 */
29 private msalApplication;
30 /**
31 * @public
32 * @constructor
33 * Creates an instance of ImplicitMSALAuthenticationProvider
34 * @param {UserAgentApplication} msalApplication - An instance of MSAL UserAgentApplication
35 * @param {MSALAuthenticationProviderOptions} options - An instance of MSALAuthenticationProviderOptions
36 * @returns An instance of ImplicitMSALAuthenticationProvider
37 */
38 constructor(msalApplication: UserAgentApplication, options: MSALAuthenticationProviderOptions);
39 /**
40 * @public
41 * @async
42 * To get the access token
43 * @param {AuthenticationProviderOptions} authenticationProviderOptions - The authentication provider options object
44 * @returns The promise that resolves to an access token
45 */
46 getAccessToken(authenticationProviderOptions?: AuthenticationProviderOptions): Promise<string>;
47}