Skip to content

Commit 466ef5e

Browse files
committed
test: remove a test for changes of System.IdentityModel.Tokens.Jwt
1 parent 1d15407 commit 466ef5e

File tree

1 file changed

+2
-55
lines changed

1 file changed

+2
-55
lines changed

src/IdentityServer4/test/IdentityServer.IntegrationTests/Endpoints/Authorize/JwtRequestAuthorizeTests.cs

Lines changed: 2 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -485,63 +485,10 @@ public async Task mismatch_in_jwt_values_should_error()
485485
_mockPipeline.LoginRequest.Should().BeNull();
486486
}
487487

488-
[Fact]
489-
[Trait("Category", Category)]
488+
[Obsolete]
490489
public async Task authorize_should_accept_complex_objects_in_request_object()
491490
{
492-
var someObj = new { foo = new { bar = "bar" }, baz = "baz" };
493-
var someObjJson = JsonSerializer.Serialize(someObj);
494-
var someArr = new[] { "a", "b", "c" };
495-
var someArrJson = JsonSerializer.Serialize(someArr);
496-
497-
498-
var requestJwt = CreateRequestJwt(
499-
issuer: _client.ClientId,
500-
audience: IdentityServerPipeline.BaseUrl,
501-
credential: new X509SigningCredentials(TestCert.Load()),
502-
claims: new[] {
503-
new Claim("client_id", _client.ClientId),
504-
new Claim("response_type", "id_token"),
505-
new Claim("scope", "openid profile"),
506-
new Claim("state", "123state"),
507-
new Claim("nonce", "123nonce"),
508-
new Claim("redirect_uri", "https://client/callback"),
509-
new Claim("acr_values", "acr_1 acr_2 tenant:tenant_value idp:idp_value"),
510-
new Claim("login_hint", "login_hint_value"),
511-
new Claim("display", "popup"),
512-
new Claim("ui_locales", "ui_locale_value"),
513-
new Claim("foo", "123foo"),
514-
new Claim("someObj", someObjJson, Microsoft.IdentityModel.JsonWebTokens.JsonClaimValueTypes.Json),
515-
new Claim("someArr", someArrJson, Microsoft.IdentityModel.JsonWebTokens.JsonClaimValueTypes.JsonArray),
516-
});
517-
518-
var url = _mockPipeline.CreateAuthorizeUrl(
519-
clientId: _client.ClientId,
520-
responseType: "id_token",
521-
extra: Parameters.FromObject(new
522-
{
523-
request = requestJwt
524-
}));
525-
var response = await _mockPipeline.BrowserClient.GetAsync(url);
526-
527-
_mockPipeline.LoginRequest.Should().NotBeNull();
528-
529-
_mockPipeline.LoginRequest.Parameters["someObj"].Should().NotBeNull();
530-
var someObj2 = JsonSerializer.Deserialize(_mockPipeline.LoginRequest.Parameters["someObj"], someObj.GetType());
531-
someObj.Should().BeEquivalentTo(someObj2);
532-
_mockPipeline.LoginRequest.Parameters["someArr"].Should().NotBeNull();
533-
var someArr2 = JsonSerializer.Deserialize<string[]>(_mockPipeline.LoginRequest.Parameters["someArr"]);
534-
someArr2.Should().Contain(new[] { "a", "c", "b" });
535-
someArr2.Length.Should().Be(3);
536-
537-
_mockPipeline.LoginRequest.RequestObjectValues.Count.Should().Be(13);
538-
_mockPipeline.LoginRequest.RequestObjectValues["someObj"].Should().NotBeNull();
539-
someObj2 = JsonSerializer.Deserialize(_mockPipeline.LoginRequest.RequestObjectValues["someObj"], someObj.GetType());
540-
someObj.Should().BeEquivalentTo(someObj2);
541-
_mockPipeline.LoginRequest.RequestObjectValues["someArr"].Should().NotBeNull();
542-
someArr2 = JsonSerializer.Deserialize<string[]>(_mockPipeline.LoginRequest.Parameters["someArr"]);
543-
someArr2.Should().Contain(new[] { "a", "c", "b" });
544-
someArr2.Length.Should().Be(3);
491+
// See https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/issues/2585
545492
}
546493

547494
[Fact]

0 commit comments

Comments
 (0)