Exemple #1
0
        public async Task <AuthenticationGetResult> GetDadosUsuarioAsync(AuthenticationGet authenticationGet)
        {
            var response = null as AuthenticationGetResult;

            if (authenticationGet.Login.Equals("hygor.azevedo") && authenticationGet.Password.Equals("testeapi"))
            {
                response = new AuthenticationGetResult()
                {
                    Authenticated = true,
                    Usuario       = new AuthenticationGetResult.AuthenticationGetResultInnerUsuario
                    {
                        Id   = Guid.NewGuid(),
                        Nome = "hygor de lima azevedo"
                    }
                };
            }

            else
            {
                response = new AuthenticationGetResult();
            }

            await Task.Delay(1000);

            return(response);
        }
Exemple #2
0
        public async Task <IActionResult> GetAsync()
        {
            var authenticationGet = new AuthenticationGet
            {
                Login    = "******",
                Password = "******"
            };
            var response = await Dapper.GetDadosUsuarioAsync(authenticationGet);

            return(Ok(response));
        }