44
55using Azure . Core ;
66using Microsoft . Kiota . Abstractions . Authentication ;
7+ using System ;
78using System . Linq ;
89
910namespace Microsoft . Graph . Authentication ;
@@ -12,10 +13,17 @@ namespace Microsoft.Graph.Authentication;
1213/// An overload of the Access Token Provider that has the defaults for Microsoft Graph.
1314/// </summary>
1415public class AzureIdentityAccessTokenProvider : Microsoft . Kiota . Authentication . Azure . AzureIdentityAccessTokenProvider {
15- /// <inheritdoc/>
16- public AzureIdentityAccessTokenProvider ( TokenCredential credential , string [ ] allowedHosts = null , Microsoft . Kiota . Authentication . Azure . ObservabilityOptions observabilityOptions = null , params string [ ] scopes )
17- : base ( credential , allowedHosts , observabilityOptions , scopes ) {
18- if ( ! allowedHosts ? . Any ( ) ?? true )
16+ /// <inheritdoc/>
17+ public AzureIdentityAccessTokenProvider ( TokenCredential credential , string [ ] allowedHosts = null , Microsoft . Kiota . Authentication . Azure . ObservabilityOptions observabilityOptions = null , bool isCaeEnabled = true , params string [ ] scopes )
18+ : base ( credential , allowedHosts , observabilityOptions , isCaeEnabled , scopes ) {
19+ if ( ! allowedHosts ? . Any ( ) ?? true )
1920 AllowedHostsValidator = new AllowedHostsValidator ( new string [ ] { "graph.microsoft.com" , "graph.microsoft.us" , "dod-graph.microsoft.us" , "graph.microsoft.de" , "microsoftgraph.chinacloudapi.cn" , "canary.graph.microsoft.com" , "graph.microsoft-ppe.com" } ) ;
2021 }
22+
23+ /// <inheritdoc/>
24+ [ Obsolete ( "This constructor is obsolete and will be removed in a future version. Use the constructor that takes an isCaeEnabled parameter instead." ) ]
25+ public AzureIdentityAccessTokenProvider ( TokenCredential credential , string [ ] allowedHosts = null , Microsoft . Kiota . Authentication . Azure . ObservabilityOptions observabilityOptions = null , params string [ ] scopes )
26+ : this ( credential , allowedHosts , observabilityOptions , true , scopes )
27+ {
28+ }
2129}
0 commit comments