UNPKG

@microsoft/kiota-authentication-spfx

Version:

Authentication provider for using Kiota in SPFx solutions

34 lines 1.87 kB
/** * ------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. * See License in the project root for license information. * ------------------------------------------------------------------------------------------- */ import { type AccessTokenProvider, AllowedHostsValidator } from "@microsoft/kiota-abstractions"; import { type AadTokenProvider } from "@microsoft/sp-http"; import { type ObservabilityOptions } from "./observabilityOptions.js"; export declare class AzureAdSpfxAccessTokenProvider implements AccessTokenProvider { private readonly tokenProvider; private readonly applicationIdUri; private readonly useCachedToken?; private readonly observabilityOptions; private readonly allowedHostsValidator; /** *@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 for authentication. */ constructor(tokenProvider: AadTokenProvider, applicationIdUri: string, allowedHosts?: Set<string>, useCachedToken?: boolean | undefined, observabilityOptions?: ObservabilityOptions); /** * @inheritdoc */ getAuthorizationToken: (url?: string, additionalAuthenticationContext?: Record<string, unknown>) => Promise<string>; private readonly getAuthorizationTokenInternal; /** * @inheritdoc */ getAllowedHostsValidator: () => AllowedHostsValidator; } //# sourceMappingURL=azureAdSpfxAccessTokenProvider.d.ts.map