@microsoft/agents-hosting
Version:
Microsoft 365 Agents SDK for JavaScript
55 lines (54 loc) • 2.04 kB
TypeScript
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import { AuthConfiguration } from './authConfiguration';
import { AuthProvider } from './authProvider';
/**
* Provides tokens using MSAL.
*/
export declare class MsalTokenProvider implements AuthProvider {
/**
* Gets an access token.
* @param authConfig The authentication configuration.
* @param scope The scope for the token.
* @returns A promise that resolves to the access token.
*/
getAccessToken(authConfig: AuthConfiguration, scope: string): Promise<string>;
acquireTokenOnBehalfOf(authConfig: AuthConfiguration, scopes: string[], oboAssertion: string): Promise<string>;
private readonly sysOptions;
/**
* Acquires a token using a user-assigned identity.
* @param authConfig The authentication configuration.
* @param scope The scope for the token.
* @returns A promise that resolves to the access token.
*/
private acquireTokenWithUserAssignedIdentity;
/**
* Acquires a token using a certificate.
* @param authConfig The authentication configuration.
* @param scope The scope for the token.
* @returns A promise that resolves to the access token.
*/
private acquireTokenWithCertificate;
/**
* Acquires a token using a client secret.
* @param authConfig The authentication configuration.
* @param scope The scope for the token.
* @returns A promise that resolves to the access token.
*/
private acquireAccessTokenViaSecret;
/**
* Acquires a token using a FIC client assertion.
* @param authConfig The authentication configuration.
* @param scope The scope for the token.
* @returns A promise that resolves to the access token.
*/
private acquireAccessTokenViaFIC;
/**
* Fetches an external token.
* @param FICClientId The FIC client ID.
* @returns A promise that resolves to the external token.
*/
private fetchExternalToken;
}