public UserToken GenerateUserToken(User user, string secretKey) { string tokenString = userTokenGenerator.GenerateToken(user, secretKey); var userToken = userTokenFactory.Create(tokenString); return(userToken); }
public IActionResult GetUserLoginToken() { var results = _userTokenGenerator.GenerateToken(); return(Ok(results)); }
public IActionResult GetToken([FromRoute] int userId) { var results = _userTokenGenerator.GenerateToken(userId); return(Ok(results)); }