diff --git a/sdk/core/Azure.Core/api/Azure.Core.net461.cs b/sdk/core/Azure.Core/api/Azure.Core.net461.cs index 7599d98a91f9..2ffe45dc08f6 100644 --- a/sdk/core/Azure.Core/api/Azure.Core.net461.cs +++ b/sdk/core/Azure.Core/api/Azure.Core.net461.cs @@ -745,7 +745,7 @@ public readonly partial struct TokenRequestContext public TokenRequestContext(string[] scopes, string? parentRequestId) { throw null; } public TokenRequestContext(string[] scopes, string? parentRequestId, string? claims) { throw null; } public TokenRequestContext(string[] scopes, string? parentRequestId, string? claims, string? tenantId) { throw null; } - public TokenRequestContext(string[] scopes, string? parentRequestId = null, string? claims = null, string? tenantId = null, bool enableCae = false) { throw null; } + public TokenRequestContext(string[] scopes, string? parentRequestId = null, string? claims = null, string? tenantId = null, bool isCaeEnabled = false) { throw null; } public string? Claims { get { throw null; } } public bool IsCaeEnabled { get { throw null; } } public string? ParentRequestId { get { throw null; } } diff --git a/sdk/core/Azure.Core/api/Azure.Core.net5.0.cs b/sdk/core/Azure.Core/api/Azure.Core.net5.0.cs index b9e789ec9051..decd53217eb0 100644 --- a/sdk/core/Azure.Core/api/Azure.Core.net5.0.cs +++ b/sdk/core/Azure.Core/api/Azure.Core.net5.0.cs @@ -745,7 +745,7 @@ public readonly partial struct TokenRequestContext public TokenRequestContext(string[] scopes, string? parentRequestId) { throw null; } public TokenRequestContext(string[] scopes, string? parentRequestId, string? claims) { throw null; } public TokenRequestContext(string[] scopes, string? parentRequestId, string? claims, string? tenantId) { throw null; } - public TokenRequestContext(string[] scopes, string? parentRequestId = null, string? claims = null, string? tenantId = null, bool enableCae = false) { throw null; } + public TokenRequestContext(string[] scopes, string? parentRequestId = null, string? claims = null, string? tenantId = null, bool isCaeEnabled = false) { throw null; } public string? Claims { get { throw null; } } public bool IsCaeEnabled { get { throw null; } } public string? ParentRequestId { get { throw null; } } diff --git a/sdk/core/Azure.Core/api/Azure.Core.net6.0.cs b/sdk/core/Azure.Core/api/Azure.Core.net6.0.cs index b9e789ec9051..decd53217eb0 100644 --- a/sdk/core/Azure.Core/api/Azure.Core.net6.0.cs +++ b/sdk/core/Azure.Core/api/Azure.Core.net6.0.cs @@ -745,7 +745,7 @@ public readonly partial struct TokenRequestContext public TokenRequestContext(string[] scopes, string? parentRequestId) { throw null; } public TokenRequestContext(string[] scopes, string? parentRequestId, string? claims) { throw null; } public TokenRequestContext(string[] scopes, string? parentRequestId, string? claims, string? tenantId) { throw null; } - public TokenRequestContext(string[] scopes, string? parentRequestId = null, string? claims = null, string? tenantId = null, bool enableCae = false) { throw null; } + public TokenRequestContext(string[] scopes, string? parentRequestId = null, string? claims = null, string? tenantId = null, bool isCaeEnabled = false) { throw null; } public string? Claims { get { throw null; } } public bool IsCaeEnabled { get { throw null; } } public string? ParentRequestId { get { throw null; } } diff --git a/sdk/core/Azure.Core/api/Azure.Core.netcoreapp2.1.cs b/sdk/core/Azure.Core/api/Azure.Core.netcoreapp2.1.cs index 7599d98a91f9..2ffe45dc08f6 100644 --- a/sdk/core/Azure.Core/api/Azure.Core.netcoreapp2.1.cs +++ b/sdk/core/Azure.Core/api/Azure.Core.netcoreapp2.1.cs @@ -745,7 +745,7 @@ public readonly partial struct TokenRequestContext public TokenRequestContext(string[] scopes, string? parentRequestId) { throw null; } public TokenRequestContext(string[] scopes, string? parentRequestId, string? claims) { throw null; } public TokenRequestContext(string[] scopes, string? parentRequestId, string? claims, string? tenantId) { throw null; } - public TokenRequestContext(string[] scopes, string? parentRequestId = null, string? claims = null, string? tenantId = null, bool enableCae = false) { throw null; } + public TokenRequestContext(string[] scopes, string? parentRequestId = null, string? claims = null, string? tenantId = null, bool isCaeEnabled = false) { throw null; } public string? Claims { get { throw null; } } public bool IsCaeEnabled { get { throw null; } } public string? ParentRequestId { get { throw null; } } diff --git a/sdk/core/Azure.Core/api/Azure.Core.netstandard2.0.cs b/sdk/core/Azure.Core/api/Azure.Core.netstandard2.0.cs index 7599d98a91f9..2ffe45dc08f6 100644 --- a/sdk/core/Azure.Core/api/Azure.Core.netstandard2.0.cs +++ b/sdk/core/Azure.Core/api/Azure.Core.netstandard2.0.cs @@ -745,7 +745,7 @@ public readonly partial struct TokenRequestContext public TokenRequestContext(string[] scopes, string? parentRequestId) { throw null; } public TokenRequestContext(string[] scopes, string? parentRequestId, string? claims) { throw null; } public TokenRequestContext(string[] scopes, string? parentRequestId, string? claims, string? tenantId) { throw null; } - public TokenRequestContext(string[] scopes, string? parentRequestId = null, string? claims = null, string? tenantId = null, bool enableCae = false) { throw null; } + public TokenRequestContext(string[] scopes, string? parentRequestId = null, string? claims = null, string? tenantId = null, bool isCaeEnabled = false) { throw null; } public string? Claims { get { throw null; } } public bool IsCaeEnabled { get { throw null; } } public string? ParentRequestId { get { throw null; } } diff --git a/sdk/core/Azure.Core/src/TokenRequestContext.cs b/sdk/core/Azure.Core/src/TokenRequestContext.cs index 764eaba2888c..afa3e3442a15 100644 --- a/sdk/core/Azure.Core/src/TokenRequestContext.cs +++ b/sdk/core/Azure.Core/src/TokenRequestContext.cs @@ -56,15 +56,15 @@ public TokenRequestContext(string[] scopes, string? parentRequestId, string? cla /// The scopes required for the token. /// The of the request requiring a token for authentication, if applicable. /// Additional claims to be included in the token. - /// The tenantId to be included in the token request. - /// - public TokenRequestContext(string[] scopes, string? parentRequestId = default, string? claims = default, string? tenantId = default, bool enableCae = false) + /// The tenantId to be included in the token request. + /// Indicates whether to enable Continuous Access Evaluation (CAE) for the requested token. + public TokenRequestContext(string[] scopes, string? parentRequestId = default, string? claims = default, string? tenantId = default, bool isCaeEnabled = false) { Scopes = scopes; ParentRequestId = parentRequestId; Claims = claims; TenantId = tenantId; - IsCaeEnabled = enableCae; + IsCaeEnabled = isCaeEnabled; } /// diff --git a/sdk/identity/Azure.Identity/tests/CredentialTestBase.cs b/sdk/identity/Azure.Identity/tests/CredentialTestBase.cs index 02becbe1c5ed..c9c4077c5eb8 100644 --- a/sdk/identity/Azure.Identity/tests/CredentialTestBase.cs +++ b/sdk/identity/Azure.Identity/tests/CredentialTestBase.cs @@ -268,25 +268,25 @@ public async Task EnableCae() // First call with EnableCae = false using (HttpPipeline.CreateClientRequestIdScope("disableCae")) { - AccessToken actualToken = await credential.GetTokenAsync(new TokenRequestContext(MockScopes.Default, enableCae: false), default); + AccessToken actualToken = await credential.GetTokenAsync(new TokenRequestContext(MockScopes.Default, isCaeEnabled: false), default); Assert.AreEqual(token, actualToken.Token); } // First call with EnableCae = true using (HttpPipeline.CreateClientRequestIdScope("enableCae")) { - AccessToken actualToken = await credential.GetTokenAsync(new TokenRequestContext(MockScopes.Default, enableCae: true), default); + AccessToken actualToken = await credential.GetTokenAsync(new TokenRequestContext(MockScopes.Default, isCaeEnabled: true), default); Assert.AreEqual(token, actualToken.Token); } // Second call with EnableCae = false using (HttpPipeline.CreateClientRequestIdScope("disableCae")) { - AccessToken actualToken = await credential.GetTokenAsync(new TokenRequestContext(MockScopes.Default, enableCae: false), default); + AccessToken actualToken = await credential.GetTokenAsync(new TokenRequestContext(MockScopes.Default, isCaeEnabled: false), default); Assert.AreEqual(token, actualToken.Token); } // Second call with EnableCae = true using (HttpPipeline.CreateClientRequestIdScope("enableCae")) { - AccessToken actualToken = await credential.GetTokenAsync(new TokenRequestContext(MockScopes.Default, enableCae: true), default); + AccessToken actualToken = await credential.GetTokenAsync(new TokenRequestContext(MockScopes.Default, isCaeEnabled: true), default); Assert.AreEqual(token, actualToken.Token); } Assert.True(observedCae);