Skip to content

Commit

Permalink
Use collection literals
Browse files Browse the repository at this point in the history
Use collection literals for string arrays.
  • Loading branch information
martincostello authored Oct 2, 2023
1 parent 3246aad commit 5b940db
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ await GenerateTokenAsync(Configure, async (context) =>

// See https://github.com/aspnet-contrib/AspNet.Security.OAuth.Providers/issues/684
securityToken.Header.Keys.OrderBy((p) => p).ShouldBe(
new[] { "alg", "kid", "typ" },
["alg", "kid", "typ"],
Case.Sensitive,
"JWT header contains unexpected additional claims.");

Expand All @@ -76,7 +76,7 @@ await GenerateTokenAsync(Configure, async (context) =>
securityToken.Payload.Exp.HasValue.ShouldBeTrue();

securityToken.Payload.Keys.OrderBy((p) => p).ShouldBe(
new[] { "aud", "exp", "iat", "iss", "nbf", "sub" },
["aud", "exp", "iat", "iss", "nbf", "sub"],
Case.Sensitive,
"JWT payload contains unexpected additional claims.");

Expand Down

0 comments on commit 5b940db

Please sign in to comment.