mirror of
https://github.com/cq-panda/Vue.NetCore.git
synced 2026-10-18 22:46:05 +08:00
fix(System): Jwt解析时,不应传入"Bearer "字符
This commit is contained in:
@@ -85,6 +85,8 @@ namespace VOL.Core.Utilities
|
||||
{
|
||||
try
|
||||
{
|
||||
if (jwtStr.IsNullOrEmpty()) return 0;
|
||||
jwtStr = jwtStr.Replace("Bearer ", "");
|
||||
return new JwtSecurityTokenHandler().ReadJwtToken(jwtStr).Id.GetInt();
|
||||
}
|
||||
catch
|
||||
|
||||
Reference in New Issue
Block a user