示例#1
0
文件: Security.cs 项目: gtjia/RepGT
        public TokenDto CreateToken(UserModel user)
        {
            //缓存Token
            var dto = new TokenDto(_jwtSettings)
            {
                User       = user,
                LastAccess = DateTime.Now
            };

            _tokens.Add(dto);

            return(dto);
        }
示例#2
0
文件: Security.cs 项目: gtjia/RepGT
 public void RemoveToken(TokenDto token)
 => _tokens.Remove(token);