From b0b8848c34905c40d38cf0c2f669ae708b10859c Mon Sep 17 00:00:00 2001 From: zhontai <361243234@qq.com> Date: Thu, 16 Nov 2023 00:11:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8D=87=E7=BA=A7System.Iden?= =?UTF-8?q?tityModel.Tokens.Jwt=E6=9C=80=E6=96=B0=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E8=AF=BB=E5=8F=96token=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/pkg.props | 2 +- build/pkg_push.ps1 | 2 +- src/hosts/ZhonTai.Host/Configs/appconfig.json | 2 +- src/platform/ZhonTai.Admin/Core/Auth/ClaimAttributes.cs | 6 ++++-- src/platform/ZhonTai.Admin/Core/Configs/JwtConfig.cs | 6 ++++-- src/platform/ZhonTai.Admin/ZhonTai.Admin.csproj | 4 ++-- 6 files changed, 13 insertions(+), 9 deletions(-) diff --git a/build/pkg.props b/build/pkg.props index b1a0aae6..9e6bafff 100644 --- a/build/pkg.props +++ b/build/pkg.props @@ -1,6 +1,6 @@ - 5.0.1 + 5.0.2 net8.0 false true diff --git a/build/pkg_push.ps1 b/build/pkg_push.ps1 index b1899ab6..76eac448 100644 --- a/build/pkg_push.ps1 +++ b/build/pkg_push.ps1 @@ -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 diff --git a/src/hosts/ZhonTai.Host/Configs/appconfig.json b/src/hosts/ZhonTai.Host/Configs/appconfig.json index be073920..8a68d88e 100644 --- a/src/hosts/ZhonTai.Host/Configs/appconfig.json +++ b/src/hosts/ZhonTai.Host/Configs/appconfig.json @@ -44,7 +44,7 @@ { "name": "中台Admin", "code": "admin", - "version": "v5.0.0", + "version": "v5.0.2", "description": "" } ] diff --git a/src/platform/ZhonTai.Admin/Core/Auth/ClaimAttributes.cs b/src/platform/ZhonTai.Admin/Core/Auth/ClaimAttributes.cs index ea3b6b41..87fda21a 100644 --- a/src/platform/ZhonTai.Admin/Core/Auth/ClaimAttributes.cs +++ b/src/platform/ZhonTai.Admin/Core/Auth/ClaimAttributes.cs @@ -1,4 +1,6 @@ -namespace ZhonTai.Admin.Core.Auth; +using System.IdentityModel.Tokens.Jwt; + +namespace ZhonTai.Admin.Core.Auth; /// /// Claim属性 @@ -8,7 +10,7 @@ public static class ClaimAttributes /// /// 用户Id /// - public const string UserId = "sub"; + public const string UserId = "id"; /// /// 用户名 diff --git a/src/platform/ZhonTai.Admin/Core/Configs/JwtConfig.cs b/src/platform/ZhonTai.Admin/Core/Configs/JwtConfig.cs index cd0da9a2..b32b96e4 100644 --- a/src/platform/ZhonTai.Admin/Core/Configs/JwtConfig.cs +++ b/src/platform/ZhonTai.Admin/Core/Configs/JwtConfig.cs @@ -1,4 +1,6 @@ -namespace ZhonTai.Admin.Core.Configs; +using System; + +namespace ZhonTai.Admin.Core.Configs; /// /// Jwt配置 @@ -18,7 +20,7 @@ public class JwtConfig /// /// 密钥 /// - public string SecurityKey { get; set; } = "ertJKl#521*a@790asD&1#"; + public string SecurityKey { get; set; } = "8efbdb87f52111e08978e9edada709525407095254008978e98efbdb87f52111"; /// /// 有效期(分钟) diff --git a/src/platform/ZhonTai.Admin/ZhonTai.Admin.csproj b/src/platform/ZhonTai.Admin/ZhonTai.Admin.csproj index eed738c6..64388204 100644 --- a/src/platform/ZhonTai.Admin/ZhonTai.Admin.csproj +++ b/src/platform/ZhonTai.Admin/ZhonTai.Admin.csproj @@ -36,13 +36,13 @@ - + - +