Skip to content

Commit

Permalink
Replace "System.IdentityModel.Tokens.Jwt" with "Microsoft.IdentityMod…
Browse files Browse the repository at this point in the history
…el.JsonWebTokens"
  • Loading branch information
SSchulze1989 committed Feb 20, 2024
1 parent edf7f6d commit 156eb16
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions src/iRLeagueApiCore.Client/Http/DefaultTokenStore.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Microsoft.Extensions.Logging;
using System.IdentityModel.Tokens.Jwt;
using System.Reflection.Metadata;
using Microsoft.IdentityModel.JsonWebTokens;

namespace iRLeagueApiCore.Client.Http;
internal sealed class DefaultTokenStore : ITokenStore
Expand Down Expand Up @@ -46,7 +44,7 @@ public async Task SetAccessTokenAsync(string token)
if (string.IsNullOrEmpty(accessToken) == false)
{
// set expiration date
var jwtToken = new JwtSecurityTokenHandler().ReadToken(accessToken);
var jwtToken = new JsonWebTokenHandler().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="System.IdentityModel.Tokens.Jwt" Version="6.10.0" />
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" Version="7.3.1" />
</ItemGroup>

<PropertyGroup>
Expand Down

0 comments on commit 156eb16

Please sign in to comment.