UNPKG

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