Skip to content

Commit

Permalink
Revert "Replace "System.IdentityModel.Tokens.Jwt" with "Microsoft.Ide…
Browse files Browse the repository at this point in the history
…ntityModel.JsonWebTokens""

This reverts commit 156eb16.
  • Loading branch information
SSchulze1989 committed Feb 20, 2024
1 parent 156eb16 commit 63d571a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/iRLeagueApiCore.Client/Http/DefaultTokenStore.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using Microsoft.IdentityModel.JsonWebTokens;
using Microsoft.Extensions.Logging;
using System.IdentityModel.Tokens.Jwt;
using System.Reflection.Metadata;

namespace iRLeagueApiCore.Client.Http;
internal sealed class DefaultTokenStore : ITokenStore
Expand Down Expand Up @@ -44,7 +46,7 @@ public async Task SetAccessTokenAsync(string token)
if (string.IsNullOrEmpty(accessToken) == false)
{
// set expiration date
var jwtToken = new JsonWebTokenHandler().ReadToken(accessToken);
var jwtToken = new JwtSecurityTokenHandler().ReadToken(accessToken);
AccessTokenExpires = jwtToken.ValidTo;
}
TokenChanged?.Invoke(this, EventArgs.Empty);
Expand Down
2 changes: 1 addition & 1 deletion src/iRLeagueApiCore.Client/iRLeagueApiCore.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<PackageReference Include="iRLeagueApiCore.Common" Version="0.11.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.2.5" />
<PackageReference Include="Microsoft.Extensions.Http" Version="6.0.0" />
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" Version="7.3.1" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.10.0" />
</ItemGroup>

<PropertyGroup>
Expand Down

0 comments on commit 63d571a

Please sign in to comment.