Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: missing constructor for CAE #879

Merged
merged 1 commit into from
Aug 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------

using System;
using Azure.Core;
using Microsoft.Kiota.Abstractions.Authentication;

Expand All @@ -18,7 +19,19 @@ public class AzureIdentityAuthenticationProvider : BaseBearerTokenAuthentication
/// <param name="allowedHosts">The list of allowed hosts for which to request access tokens.</param>
/// <param name="scopes">The scopes to request the access token for.</param>
/// <param name="observabilityOptions">The observability options to use for the authentication provider.</param>
public AzureIdentityAuthenticationProvider(TokenCredential credential, string[] allowedHosts = null, Microsoft.Kiota.Authentication.Azure.ObservabilityOptions observabilityOptions = null, params string[] scopes) : base(new AzureIdentityAccessTokenProvider(credential, allowedHosts, observabilityOptions, scopes))
/// <param name="isCaeEnabled">Determines if the Continuous Access Evaluation (CAE) is enabled.</param>
public AzureIdentityAuthenticationProvider(TokenCredential credential, string[] allowedHosts = null, Microsoft.Kiota.Authentication.Azure.ObservabilityOptions observabilityOptions = null, bool isCaeEnabled = true, params string[] scopes) : base(new AzureIdentityAccessTokenProvider(credential, allowedHosts, observabilityOptions, isCaeEnabled, scopes))
{
}
/// <summary>
/// The <see cref="AzureIdentityAuthenticationProvider"/> constructor
/// </summary>
/// <param name="credential">The credential implementation to use to obtain the access token.</param>
/// <param name="allowedHosts">The list of allowed hosts for which to request access tokens.</param>
/// <param name="scopes">The scopes to request the access token for.</param>
/// <param name="observabilityOptions">The observability options to use for the authentication provider.</param>
[Obsolete("Use the constructor that takes an isCaeEnabled parameter instead.")]
public AzureIdentityAuthenticationProvider(TokenCredential credential, string[] allowedHosts = null, Microsoft.Kiota.Authentication.Azure.ObservabilityOptions observabilityOptions = null, params string[] scopes) : this(credential, allowedHosts, observabilityOptions, true, scopes)
{
}
}
Loading