Пример #1
0
        public JsonWebToken ActiveToken(string username)
        {
            var user = new { Username = username };

            if (user == null)
            {
                throw new Exception("Invalid credentials.");
            }
            var jwt = _jwtManager.Create(user.Username);

            return(jwt);
        }