镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/SimpleAuthentication/JwtBearer/JwtBearerService.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Globalization;
using System.IdentityModel.Tokens.Jwt;
using System.IdentityModel.Tokens.Jwt;
using System.Security.Claims;
using System.Text;
using Microsoft.Extensions.Options;
Expand All @@ -20,7 +19,7 @@ public string CreateToken(string userName, IList<Claim>? claims = null, string?
{
claims ??= new List<Claim>();
claims.Update(ClaimTypes.Name, userName);
claims.Update(JwtRegisteredClaimNames.Jti, Guid.NewGuid().ToString().GetHashCode().ToString("x", CultureInfo.InvariantCulture));
claims.Update(JwtRegisteredClaimNames.Jti, Guid.NewGuid().ToString());
claims.Remove(JwtRegisteredClaimNames.Aud);

var now = DateTime.UtcNow;
Expand Down
2 changes: 1 addition & 1 deletion src/SimpleAuthentication/SimpleAuthentication.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="SimpleAuthenticationTools.Abstractions" Version="2.0.7" />
<PackageReference Include="SimpleAuthenticationTools.Abstractions" Version="2.0.8" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="6.5.0" />
</ItemGroup>

Expand Down