示例#1
0
 public async Task <Result <LoginOutput> > Login([FromBody, Required] LoginRequest loginRequest, [FromServices] IAuthAppService authAppService)
 {
     return(await authAppService.LoginAsync(loginRequest.MapTo <LoginInput>()));
 }
        public async Task <IActionResult> LoginAsync([FromServices] IAuthAppService authAppService, [FromForm] Login login)
        {
            var refreshToken = await authAppService.LoginAsync(login, Request.HttpContext.Connection.RemoteIpAddress.AddressFamily.ToString());

            return(Ok(refreshToken));
        }