Skip to content

Commit

Permalink
Whitespace and formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
kzu committed Jun 7, 2024
1 parent e732f6a commit d74f511
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/SponsorLink/Tests/SponsorLinkTests.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
extern alias Analyzer;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.IdentityModel.Tokens.Jwt;
using System.Linq;
using System.Security.Claims;
using System.Security.Cryptography;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
using Analyzer::Devlooped.Sponsors;
using Devlooped.Sponsors;
using Microsoft.IdentityModel.Tokens;
Expand Down Expand Up @@ -98,9 +90,7 @@ public void TryRead()
// Org + personal sponsor
var barSponsor = barSponsorable.Sign([new("sub", "kzu"), new("email", "me@bar.com"), new("roles", "org"), new("roles", "user")], expiration: TimeSpan.FromDays(30));

Assert.True(SponsorLink.TryRead(out var principal,
[(fooSponsor, ToJwk(fooSponsorable.SecurityKey)),
(barSponsor, ToJwk(barSponsorable.SecurityKey))]));
Assert.True(SponsorLink.TryRead(out var principal, [(fooSponsor, ToJwk(fooSponsorable.SecurityKey)), (barSponsor, ToJwk(barSponsorable.SecurityKey))]));

// Can check role across both JWTs
Assert.True(principal.IsInRole("org"));
Expand Down

0 comments on commit d74f511

Please sign in to comment.