UNPKG

1.73 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 AuthCodeMSALBrowserAuthenticationProvider
9 */
10import { PublicClientApplication } from "@azure/msal-browser";
11import { AuthenticationProvider } from "../../IAuthenticationProvider";
12import { AuthCodeMSALBrowserAuthenticationProviderOptions } from "../msalOptions/MSALAuthenticationProviderOptions";
13/**
14 * an AuthenticationProvider implementation supporting msal-browser library.
15 * This feature is introduced in Version 3.0.0
16 * @class
17 * @extends AuthenticationProvider
18 */
19export declare class AuthCodeMSALBrowserAuthenticationProvider implements AuthenticationProvider {
20 private publicClientApplication;
21 private options;
22 /**
23 * @public
24 * @constructor
25 * Creates an instance of ImplicitMSALAuthenticationProvider
26 * @param {PublicClientApplication} msalApplication - An instance of MSAL PublicClientApplication
27 * @param {AuthCodeMSALBrowserAuthenticationProviderOptions} options - An instance of MSALAuthenticationProviderOptions
28 * @returns An instance of ImplicitMSALAuthenticationProvider
29 */
30 constructor(publicClientApplication: PublicClientApplication, options: AuthCodeMSALBrowserAuthenticationProviderOptions);
31 /**
32 * @public
33 * @async
34 * To get the access token for the request
35 * @returns The promise that resolves to an access token
36 */
37 getAccessToken(): Promise<string>;
38}