Пример #1
0
        public async Task <ActionResult> Authenticate(Authenticate.Command cmd)
        {
            cmd.WithIPAddress(
                Request.HttpContext.Connection.RemoteIpAddress.ToString()
                );

            var r = await _mediator.Send(cmd);

            var error = r.Error;

            if (error == null)
            {
                await EstablishSignedInIdentity(HttpContext, r.Aggregate);
            }

            return(this.OkOrError(r));
        }
Пример #2
0
 public async Task <IActionResult> Authenticate([FromBody] Authenticate.Command request)
 => Ok(await mediator.Send(request));