@microsoft/kiota-authentication-spfx
Version:
Authentication provider for using Kiota in SPFx solutions
22 lines • 1.64 kB
JavaScript
/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import { BaseBearerTokenAuthenticationProvider } from "@microsoft/kiota-abstractions";
import { AzureAdSpfxAccessTokenProvider } from "./azureAdSpfxAccessTokenProvider.js";
import { ObservabilityOptionsImpl } from "./observabilityOptions.js";
export class AzureAdSpfxAuthenticationProvider extends BaseBearerTokenAuthenticationProvider {
/**
*@param tokenProvider The tokenProvider provided by the SharePoint framework
*@param applicationIdUri The application ID URI of the Azure AD App that we want to Authenticate
*@param allowedHosts The allowed hosts to use for authentication.
*@param useCachedToken Allows the developer to specify if cached tokens should be returned.
*@param observabilityOptions The observability options to use.
*/
constructor(tokenProvider, applicationIdUri, allowedHosts = new Set(["graph.microsoft.com", "graph.microsoft.us", "dod-graph.microsoft.us", "graph.microsoft.de", "microsoftgraph.chinacloudapi.cn", "canary.graph.microsoft.com"]), useCachedToken, observabilityOptions = new ObservabilityOptionsImpl()) {
super(new AzureAdSpfxAccessTokenProvider(tokenProvider, applicationIdUri, allowedHosts, useCachedToken, observabilityOptions));
}
}
//# sourceMappingURL=azureAdSpfxAuthenticationProvider.js.map