Skip to content

Commit

Permalink
Fix Aud default value
Browse files Browse the repository at this point in the history
  • Loading branch information
gao-sun committed Feb 1, 2024
1 parent 74bd2c1 commit 092d75e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public void Collects_Claims_From_Complex_Type()

var claims = complexType.AsClaims().ToList();

Assert.That(claims.Count, Is.EqualTo(32));
Assert.That(claims.Count, Is.EqualTo(30));
}

public class ComplexType
Expand Down
2 changes: 1 addition & 1 deletion src/Blorc.OpenIdConnect.Tests/Models/UserFacts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ public void Can_Deserialize_Additional_Data() {
""access_token"": ""access_token_value"",
""expires_at"": 10,
""profile"": {
""aud"": ""https://localhost:5001"",
""sub"": ""1234567890"",
""some_additional_data"": ""some_additional_data_value""
},
Expand All @@ -69,6 +68,7 @@ public void Can_Deserialize_Additional_Data() {
var user = JsonSerializer.Deserialize<User<Profile>>(json);

Assert.That(user, Is.Not.Null);
Assert.That(user.Profile!.Audiences, Is.Empty);
Assert.That(user.Profile!.AdditionalData, Is.Not.Null);
Assert.That(user.Profile!.AdditionalData!["some_additional_data"].GetString(), Is.EqualTo("some_additional_data_value"));
}
Expand Down
2 changes: 1 addition & 1 deletion src/Blorc.OpenIdConnect/Models/Profile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public JsonElement Aud
{
get;
set;
} = JsonDocument.Parse("\"\"").RootElement;
} = JsonDocument.Parse("[]").RootElement;

public string[] Audiences
{
Expand Down

0 comments on commit 092d75e

Please sign in to comment.