【修复】修复JwtConfig下SecretKey节点如果设置字段串,拼接失败导致加密报错的问题。

This commit is contained in:
jianweie
2024-05-11 10:46:22 +08:00
parent 9edf1a8ff0
commit 481518b474

View File

@@ -72,7 +72,7 @@ namespace CoreCms.Net.Configuration
#region Jwt授权配置================================================================================
public static readonly string JwtConfigSecretKey = AppSettingsHelper.GetContent("JwtConfig", "SecretKey") + AppSettingsHelper.GetMachineRandomKey(DbSqlConnection + AppSettingsHelper.GetMACIp(true));
public static readonly string JwtConfigSecretKey = AppSettingsHelper.GetMachineRandomKey(DbSqlConnection + AppSettingsHelper.GetMACIp(true) + AppSettingsHelper.GetContent("JwtConfig", "SecretKey"));
public static readonly string JwtConfigIssuer = !string.IsNullOrEmpty(AppSettingsHelper.GetContent("JwtConfig", "Issuer")) ? AppSettingsHelper.GetContent("JwtConfig", "Issuer") : AppSettingsHelper.GetHostName();
public static readonly string JwtConfigAudience = AppSettingsHelper.GetContent("JwtConfig", "Audience");
#endregion