修改问题

This commit is contained in:
zpc 2024-09-03 22:10:55 +08:00
parent 925a58ca34
commit bef6e53819

View File

@ -237,6 +237,8 @@ namespace HuanMeng.MiaoYu.Code.Base
}
}
if (!string.IsNullOrEmpty(accessToken))
{
try
{
var (principal, jwtToken) = JwtAuthManager.DecodeJwtToken(accessToken);
if (jwtToken == null)//|| !jwtToken.Header.Alg.Equals(SecurityAlgorithms.HmacSha256Signature)
@ -256,6 +258,14 @@ namespace HuanMeng.MiaoYu.Code.Base
NickName = nickName
};
}
catch (Exception)
{
_userInfo = new RequestUserInfo()
{
UserId = 0
};
}
}
else
{
_userInfo = new RequestUserInfo()