Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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 @@ -74,6 +74,14 @@ public override string? Authority
/// The default is <c>false</c>.
/// </summary>
public bool SendX5C { get; set; }

/// <summary>
/// Gets or sets the claims used to create the client assertion for authentication.
/// </summary>
/// <remarks>The client assertion claims are typically used in scenarios where client
/// authentication requires a signed JWT (JSON Web Token). Ensure the claims are properly formatted and encoded
/// as a JSON string before setting this property.</remarks>
public IDictionary<string, string>? ClientAssertionClaims { get; set; }
#endregion Token Acquisition
}
}
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
#nullable enable
Microsoft.Identity.Abstractions.IAuthorizationHeaderProvider2
Microsoft.Identity.Abstractions.MicrosoftEntraApplicationOptions.ClientAssertionClaims.get -> System.Collections.Generic.IDictionary<string!, string!>?
Microsoft.Identity.Abstractions.MicrosoftEntraApplicationOptions.ClientAssertionClaims.set -> void
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
#nullable enable
Microsoft.Identity.Abstractions.IAuthorizationHeaderProvider2
Microsoft.Identity.Abstractions.MicrosoftEntraApplicationOptions.ClientAssertionClaims.get -> System.Collections.Generic.IDictionary<string!, string!>?
Microsoft.Identity.Abstractions.MicrosoftEntraApplicationOptions.ClientAssertionClaims.set -> void
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
#nullable enable
Microsoft.Identity.Abstractions.IAuthorizationHeaderProvider2
Microsoft.Identity.Abstractions.MicrosoftEntraApplicationOptions.ClientAssertionClaims.get -> System.Collections.Generic.IDictionary<string!, string!>?
Microsoft.Identity.Abstractions.MicrosoftEntraApplicationOptions.ClientAssertionClaims.set -> void
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
#nullable enable
Microsoft.Identity.Abstractions.IAuthorizationHeaderProvider2
Microsoft.Identity.Abstractions.MicrosoftEntraApplicationOptions.ClientAssertionClaims.get -> System.Collections.Generic.IDictionary<string!, string!>?
Microsoft.Identity.Abstractions.MicrosoftEntraApplicationOptions.ClientAssertionClaims.set -> void
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
#nullable enable
Microsoft.Identity.Abstractions.IAuthorizationHeaderProvider2
Microsoft.Identity.Abstractions.MicrosoftEntraApplicationOptions.ClientAssertionClaims.get -> System.Collections.Generic.IDictionary<string!, string!>?
Microsoft.Identity.Abstractions.MicrosoftEntraApplicationOptions.ClientAssertionClaims.set -> void
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
#nullable enable
Microsoft.Identity.Abstractions.IAuthorizationHeaderProvider2
Microsoft.Identity.Abstractions.MicrosoftEntraApplicationOptions.ClientAssertionClaims.get -> System.Collections.Generic.IDictionary<string!, string!>?
Microsoft.Identity.Abstractions.MicrosoftEntraApplicationOptions.ClientAssertionClaims.set -> void
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
PopPublicKey = "PopKey",
PopClaim = "jwkClaim",
Tenant = "domain.com",
UserFlow = "susi"

UserFlow = "susi",
ClientAssertionClaims = new Dictionary<string, string> { { "clientClaim", "claim" } },

Check failure on line 46 in test/Microsoft.Identity.Abstractions.Tests/DownstreamApiTests.cs

View workflow job for this annotation

GitHub Actions / Run tests and pack

'AcquireTokenOptions' does not contain a definition for 'ClientAssertionClaims'

Check failure on line 46 in test/Microsoft.Identity.Abstractions.Tests/DownstreamApiTests.cs

View workflow job for this annotation

GitHub Actions / Run tests and pack

'AcquireTokenOptions' does not contain a definition for 'ClientAssertionClaims'

Check failure on line 46 in test/Microsoft.Identity.Abstractions.Tests/DownstreamApiTests.cs

View workflow job for this annotation

GitHub Actions / Run tests and pack

'AcquireTokenOptions' does not contain a definition for 'ClientAssertionClaims'
},
BaseUrl = "https://apitocall.domain.com",
CustomizeHttpRequestMessage = message => message.Headers.Add("x-sku", "sku-value"),
Expand Down Expand Up @@ -96,6 +96,7 @@
Assert.Equal(downstreamApiOptions.AcquireTokenOptions.PopClaim, downstreamApiClone.AcquireTokenOptions.PopClaim);
Assert.Equal(downstreamApiOptions.AcquireTokenOptions.Tenant, downstreamApiClone.AcquireTokenOptions.Tenant);
Assert.Equal(downstreamApiOptions.AcquireTokenOptions.UserFlow, downstreamApiClone.AcquireTokenOptions.UserFlow);
Assert.Equal(downstreamApiOptions.AcquireTokenOptions.ClientAssertionClaims, downstreamApiClone.AcquireTokenOptions.ClientAssertionClaims);

Check failure on line 99 in test/Microsoft.Identity.Abstractions.Tests/DownstreamApiTests.cs

View workflow job for this annotation

GitHub Actions / Run tests and pack

'AcquireTokenOptions' does not contain a definition for 'ClientAssertionClaims' and no accessible extension method 'ClientAssertionClaims' accepting a first argument of type 'AcquireTokenOptions' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 99 in test/Microsoft.Identity.Abstractions.Tests/DownstreamApiTests.cs

View workflow job for this annotation

GitHub Actions / Run tests and pack

'AcquireTokenOptions' does not contain a definition for 'ClientAssertionClaims' and no accessible extension method 'ClientAssertionClaims' accepting a first argument of type 'AcquireTokenOptions' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 99 in test/Microsoft.Identity.Abstractions.Tests/DownstreamApiTests.cs

View workflow job for this annotation

GitHub Actions / Run tests and pack

'AcquireTokenOptions' does not contain a definition for 'ClientAssertionClaims' and no accessible extension method 'ClientAssertionClaims' accepting a first argument of type 'AcquireTokenOptions' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 99 in test/Microsoft.Identity.Abstractions.Tests/DownstreamApiTests.cs

View workflow job for this annotation

GitHub Actions / Run tests and pack

'AcquireTokenOptions' does not contain a definition for 'ClientAssertionClaims' and no accessible extension method 'ClientAssertionClaims' accepting a first argument of type 'AcquireTokenOptions' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 99 in test/Microsoft.Identity.Abstractions.Tests/DownstreamApiTests.cs

View workflow job for this annotation

GitHub Actions / Run tests and pack

'AcquireTokenOptions' does not contain a definition for 'ClientAssertionClaims' and no accessible extension method 'ClientAssertionClaims' accepting a first argument of type 'AcquireTokenOptions' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 99 in test/Microsoft.Identity.Abstractions.Tests/DownstreamApiTests.cs

View workflow job for this annotation

GitHub Actions / Run tests and pack

'AcquireTokenOptions' does not contain a definition for 'ClientAssertionClaims' and no accessible extension method 'ClientAssertionClaims' accepting a first argument of type 'AcquireTokenOptions' could be found (are you missing a using directive or an assembly reference?)
Assert.Equal("application/json", downstreamApiClone.AcceptHeader);
Assert.Equal("application/json", downstreamApiClone.ContentType);
Assert.Equal(downstreamApiOptions.ExtraHeaderParameters, downstreamApiClone.ExtraHeaderParameters);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public void MicrosoftIdentityApplicationOptionsProperties()
ResetPasswordPolicyId = "ResetPasswordPolicyId",
ResetPasswordPath = "ResetPasswordPath",
ErrorPath = "ErrorPath",
ClientAssertionClaims = new Dictionary<string, string> { { "claim1", "value1" } }
};

Assert.Equal("https://login.microsoftonline.com/common/v2.0", microsoftIdentityApplicationOptions.Authority);
Expand Down Expand Up @@ -81,6 +82,7 @@ public void MicrosoftIdentityApplicationOptionsProperties()
Assert.Equal(nameof(microsoftIdentityApplicationOptions.ErrorPath), microsoftIdentityApplicationOptions.ErrorPath);
Assert.Equal(nameof(microsoftIdentityApplicationOptions.SignUpSignInPolicyId), microsoftIdentityApplicationOptions.DefaultUserFlow);
Assert.NotEmpty(microsoftIdentityApplicationOptions.ExtraQueryParameters);
Assert.Equal(microsoftIdentityApplicationOptions.ClientAssertionClaims, microsoftIdentityApplicationOptions.ClientAssertionClaims);
}


Expand Down
Loading