Skip to content

Commit

Permalink
Merge pull request #879 from microsoftgraph/bugfix/cae-constructor
Browse files Browse the repository at this point in the history
fix: missing constructor for CAE
  • Loading branch information
baywet authored Aug 16, 2024
2 parents c614941 + 2dad161 commit a164f69
Showing 1 changed file with 14 additions and 1 deletion.
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)
{
}
}

0 comments on commit a164f69

Please sign in to comment.