|
|
@ -13,12 +13,12 @@ namespace Myshipping.Web.Core;
|
|
|
|
|
|
|
|
|
|
|
|
public class JwtHandler : AppAuthorizeHandler
|
|
|
|
public class JwtHandler : AppAuthorizeHandler
|
|
|
|
{
|
|
|
|
{
|
|
|
|
//private ISysMenuService _sysMenuService;
|
|
|
|
private ISysMenuService _sysMenuService;
|
|
|
|
|
|
|
|
|
|
|
|
//public JwtHandler(ISysMenuService sysMenuService)
|
|
|
|
public JwtHandler(ISysMenuService sysMenuService)
|
|
|
|
//{
|
|
|
|
{
|
|
|
|
// _sysMenuService = sysMenuService;
|
|
|
|
_sysMenuService = sysMenuService;
|
|
|
|
//}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
@ -71,7 +71,7 @@ public class JwtHandler : AppAuthorizeHandler
|
|
|
|
if (routeName == "sysUser:updatePwd") return true;
|
|
|
|
if (routeName == "sysUser:updatePwd") return true;
|
|
|
|
|
|
|
|
|
|
|
|
Stopwatch sw = Stopwatch.StartNew();
|
|
|
|
Stopwatch sw = Stopwatch.StartNew();
|
|
|
|
var _sysMenuService = App.GetService<ISysMenuService>();
|
|
|
|
//var _sysMenuService = App.GetService<ISysMenuService>();
|
|
|
|
var allPermission = await _sysMenuService.GetAllPermission();
|
|
|
|
var allPermission = await _sysMenuService.GetAllPermission();
|
|
|
|
httpContext.Response.Headers["CheckTimeCheckAuthorzie1"] = sw.ElapsedMilliseconds.ToString();
|
|
|
|
httpContext.Response.Headers["CheckTimeCheckAuthorzie1"] = sw.ElapsedMilliseconds.ToString();
|
|
|
|
if (!allPermission.Contains(routeName))
|
|
|
|
if (!allPermission.Contains(routeName))
|
|
|
|