public string Authenticate(string username, string password) { User user = ValidateUserPassword(username, password); Save(user); UserIdentification identification = new UserIdentification(user.Id, user.Username); return(AuthorizationProvider.GenerateToken(user.Id, user.Username)); }