UNPKG

1.03 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 */
7import { AuthenticationProviderOptions } from "./IAuthenticationProviderOptions";
8/**
9 * @interface
10 * A signature representing Authentication provider
11 * @property {Function} getAccessToken - The function to get the access token from the authentication provider
12 */
13export interface AuthenticationProvider {
14 /**
15 * To get access token from the authentication provider
16 * @param {AuthenticationProviderOptions} [authenticationProviderOptions] - The authentication provider options instance
17 * @returns A promise that resolves to an access token
18 */
19 getAccessToken: (authenticationProviderOptions?: AuthenticationProviderOptions) => Promise<string>;
20}