优化配置文件查询
This commit is contained in:
@@ -71,8 +71,9 @@ namespace ZR.Admin.WebApi.Framework
|
||||
/// <returns></returns>
|
||||
public static TokenValidationParameters ValidParameters()
|
||||
{
|
||||
JwtSettings jwtSettings = new JwtSettings();
|
||||
ConfigUtils.Instance.Bind("JwtSettings", jwtSettings);
|
||||
JwtSettings jwtSettings = new();
|
||||
AppSettings.Bind("JwtSettings", jwtSettings);
|
||||
|
||||
if (jwtSettings == null || jwtSettings.SecretKey.IsEmpty())
|
||||
{
|
||||
throw new Exception("JwtSettings获取失败");
|
||||
|
||||
Reference in New Issue
Block a user