forked from microsoftgraph/msgraph-sdk-javascript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
IAuthenticationProvider.ts
22 lines (20 loc) · 1012 Bytes
/
IAuthenticationProvider.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import { AuthenticationProviderOptions } from "./IAuthenticationProviderOptions";
/**
* @interface
* A signature representing Authentication provider
* @property {Function} getAccessToken - The function to get the access token from the authentication provider
*/
export interface AuthenticationProvider {
/**
* To get access token from the authentication provider
* @param {AuthenticationProviderOptions} [authenticationProviderOptions] - The authentication provider options instance
* @returns A promise that resolves to an access token
*/
getAccessToken: (authenticationProviderOptions?: AuthenticationProviderOptions) => Promise<string>;
}