public ActionResult Login(LoginRequestDto request) { if (!ModelState.IsValid) { return(BadRequest("Invalid Request")); } var token = _authService.Authenticated(request); if (token is null) { return(BadRequest("用户不存在或密码错误")); } return(Ok(token)); }
/// <summary> /// 判断当前用户是否已经被验证 /// </summary> /// <returns></returns> public static bool Authenticated() { return(_authenticateService.Authenticated()); }