internal static async Task <Resp> LogOut(UserIdentity user) { // 清楚用户权限相关缓存 await FuncHelper.ClearAuthUserFuncListCache(user); await ClearAdminCache(); return(new Resp(RespTypes.UnLogin, "请登录!")); }
internal static async Task <Resp> LogOut(HttpContext context) { ClearCookie(context.Response); var userRes = await GetAuthAdmin(); if (!userRes.IsSuccess()) { return(new Resp()); } // 清楚用户权限相关缓存 await FuncHelper.ClearAuthUserFuncListCache(userRes.data); await ClearAdminCache(); return(new Resp(RespTypes.UnLogin, "请登录!")); }