예제 #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"));
        }
예제 #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ı"));
        }
예제 #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"));
        }