修复升级System.IdentityModel.Tokens.Jwt最新版本无法读取token的问题

master
zhontai 1 year ago
parent f40a451e89
commit b0b8848c34

@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<Version>5.0.1</Version>
<Version>5.0.2</Version>
<TargetFramework>net8.0</TargetFramework>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<GenerateDocumentationFile>true</GenerateDocumentationFile>

@ -7,7 +7,7 @@ if ([System.String]::IsNullOrWhiteSpace($apiKey))
{
$apiKey = $env:NUGET_KEY
}
$sourceUrl = "http://localhost:5000/v3/index.json"
$sourceUrl = "https://api.nuget.org/v3/index.json"
Write-Host "buildFolder:" $buildFolder
Write-Host "rootFolder:" $rootFolder

@ -44,7 +44,7 @@
{
"name": "中台Admin",
"code": "admin",
"version": "v5.0.0",
"version": "v5.0.2",
"description": ""
}
]

@ -1,4 +1,6 @@
namespace ZhonTai.Admin.Core.Auth;
using System.IdentityModel.Tokens.Jwt;
namespace ZhonTai.Admin.Core.Auth;
/// <summary>
/// Claim属性
@ -8,7 +10,7 @@ public static class ClaimAttributes
/// <summary>
/// 用户Id
/// </summary>
public const string UserId = "sub";
public const string UserId = "id";
/// <summary>
/// 用户名

@ -1,4 +1,6 @@
namespace ZhonTai.Admin.Core.Configs;
using System;
namespace ZhonTai.Admin.Core.Configs;
/// <summary>
/// Jwt配置
@ -18,7 +20,7 @@ public class JwtConfig
/// <summary>
/// 密钥
/// </summary>
public string SecurityKey { get; set; } = "ertJKl#521*a@790asD&1#";
public string SecurityKey { get; set; } = "8efbdb87f52111e08978e9edada709525407095254008978e98efbdb87f52111";
/// <summary>
/// 有效期(分钟)

@ -36,13 +36,13 @@
<PackageReference Include="OnceMi.AspNetCore.OSS" Version="1.2.0" />
<PackageReference Include="SixLabors.ImageSharp" Version="3.0.2" />
<PackageReference Include="SixLabors.ImageSharp.Drawing" Version="2.0.1" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.33.0" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="7.0.3" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
<PackageReference Include="UAParser" Version="3.1.47" />
<PackageReference Include="Yitter.IdGenerator" Version="1.0.14" />
<PackageReference Include="System.Net.NameResolution" Version="4.3.0" />
<PackageReference Include="System.Net.Primitives" Version="4.3.0" />
<PackageReference Include="System.Net.Primitives" Version="4.3.1" />
</ItemGroup>
<ItemGroup>

Loading…
Cancel
Save