Example #1
0
        public async Task <IActionResult> GetRefreshToken(string username, string password, string device)
        {
            var user = _userRepository.GetUserByCredentials(username, password);

            if (user == null)
            {
                return(Unauthorized());
            }
            return(Json(Mapper.Map <ViewRefreshToken>(await _refreshTokenRepository.CreateTokenForUser(user, device))));
        }