UNPKG

@microsoft/kiota-authentication-azure

Version:

Authentication provider for Kiota using Azure Identity

23 lines 1.72 kB
/** * ------------------------------------------------------------------------------------------- * 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 { AzureIdentityAccessTokenProvider } from "./azureIdentityAccessTokenProvider.js"; import { ObservabilityOptionsImpl } from "./observabilityOptions.js"; export class AzureIdentityAuthenticationProvider extends BaseBearerTokenAuthenticationProvider { /** *@param credentials The tokenCredential implementation to use for authentication. *@param scopes The scopes to use for authentication. *@param options The options to use for authentication. *@param allowedHosts The allowed hosts to use for authentication. *@param observabilityOptions The observability options to use for authentication. *@param isCaeEnabled A flag to determine if Continuous Access Evaluation is enabled */ constructor(credentials, scopes = ["https://graph.microsoft.com/.default"], options, allowedHosts = new Set(["graph.microsoft.com", "graph.microsoft.us", "dod-graph.microsoft.us", "graph.microsoft.de", "microsoftgraph.chinacloudapi.cn", "canary.graph.microsoft.com"]), observabilityOptions = new ObservabilityOptionsImpl(), isCaeEnabled = true) { super(new AzureIdentityAccessTokenProvider(credentials, scopes, options, allowedHosts, observabilityOptions, isCaeEnabled)); } } //# sourceMappingURL=azureIdentityAuthenticationProvider.js.map