Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion sdk/core/Azure.Core/api/Azure.Core.net461.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; } }
Expand Down
2 changes: 1 addition & 1 deletion sdk/core/Azure.Core/api/Azure.Core.net5.0.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; } }
Expand Down
2 changes: 1 addition & 1 deletion sdk/core/Azure.Core/api/Azure.Core.net6.0.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; } }
Expand Down
2 changes: 1 addition & 1 deletion sdk/core/Azure.Core/api/Azure.Core.netcoreapp2.1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; } }
Expand Down
2 changes: 1 addition & 1 deletion sdk/core/Azure.Core/api/Azure.Core.netstandard2.0.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; } }
Expand Down
8 changes: 4 additions & 4 deletions sdk/core/Azure.Core/src/TokenRequestContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ public TokenRequestContext(string[] scopes, string? parentRequestId, string? cla
/// <param name="scopes">The scopes required for the token.</param>
/// <param name="parentRequestId">The <see cref="Request.ClientRequestId"/> of the request requiring a token for authentication, if applicable.</param>
/// <param name="claims">Additional claims to be included in the token.</param>
/// <param name="tenantId"> The tenantId to be included in the token request. </param>
/// <param name="enableCae"></param>
public TokenRequestContext(string[] scopes, string? parentRequestId = default, string? claims = default, string? tenantId = default, bool enableCae = false)
/// <param name="tenantId"> The tenantId to be included in the token request.</param>
/// <param name="isCaeEnabled">Indicates whether to enable Continuous Access Evaluation (CAE) for the requested token.</param>
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;
}

/// <summary>
Expand Down
8 changes: 4 additions & 4 deletions sdk/identity/Azure.Identity/tests/CredentialTestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down