Beispiel #1
0
        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));
        }
Beispiel #2
0
        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));
        }