Ejemplo n.º 1
0
        public async Task <IActionResult> SignIn(AppUserSignInDto appUserSignInDto)
        {
            var user = await _appUserService.CheckUserAsync(appUserSignInDto);

            if (user != null)
            {
                return(Created("", _jwtService.GenerateJwt(user)));
            }
            return(BadRequest("User name or password is wrong"));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> SignIn(AppUserLoginDto appUserLoginDto)
        {
            var user = await _appUserService.CheckUserAsync(appUserLoginDto);

            if (user != null)
            {
                return(Created("", _jwtService.GenerateJwt(user)));
            }
            return(BadRequest("kullanıcı adı veya şifre hatalı"));
        }
Ejemplo n.º 3
0
        public async Task <IActionResult> SignIn(AppUserLoginDTO appUserLoginDTO)
        {
            var user = await _appUserService.CheckUserAsync(appUserLoginDTO);

            if (user != null)
            {
                return(Created("", _jwtService.GenerateJwt(user)));
            }
            return(BadRequest("Please check your username and password"));
        }