public async Task <ActionResult <AuthenticationTokenApiResponse> > Login([FromForm] LoginApiRequest request) { AuthenticationToken token = await _authenticationService.Login(request.Username, request.Password); AuthenticationTokenApiResponse response = _mapper.Map <AuthenticationTokenApiResponse>(token); return(Created(response)); }
public async Task <ActionResult <AuthenticationTokenApiResponse> > RefreshToken([FromForm] RefreshTokenApiRequest request) { AuthenticationToken token = await _authenticationService.RefreshToken(request.RefreshToken); AuthenticationTokenApiResponse response = _mapper.Map <AuthenticationTokenApiResponse>(token); return(Created(response)); }