数据权限功能、用户信息缓存

This commit is contained in:
陈淳
2022-11-04 23:23:54 +08:00
parent 23a9d02aba
commit 97b4ab2f15
6 changed files with 47 additions and 14 deletions

View File

@@ -27,6 +27,11 @@ namespace Yi.Framework.Core
return this.GetToken(_JWTTokenOptions.ReExpiration, user, null, true);
}
public TimeSpan GetTokenExpiration()
{
return new TimeSpan(0, _JWTTokenOptions.Expiration, 0);
}
public string GetAccessToken(UserEntity user, HashSet<MenuEntity> menus)
{
return this.GetToken(_JWTTokenOptions.Expiration, user, menus);