private boolean isIframeMode(HttpServletRequest request) {
   String isIframeMode = request.getParameter(Constants.IS_IFRAME_MODE);
   if (YesNo.YES.equals(isIframeMode)) {
     return true;
   }
   return false;
 }
 private void userValidate(AccountVO account) throws Exception {
   if (account == null) {
     return;
   }
   if (!YesNo.YES.equals(account.getOnJob())) {
     throw new InvalidAccountException("Invalid account!");
   }
 }
 private boolean isDojoxContentPane(HttpServletRequest request) {
   String isDojoxContentPane = request.getParameter(Constants.IS_DOJOX_CONTENT_PANE_XHR_LOAD);
   if (YesNo.YES.equals(
       isDojoxContentPane)) { // dojox.layout.ContentPane 它的 X-Requested-With 是 XMLHttpRequest
     return true;
   }
   return false;
 }
 protected void doCaptchaValidate(
     HttpServletRequest request, GreenStepBaseUsernamePasswordToken token) {
   if (!YesNo.YES.equals(
       Constants
           .getLoginCaptchaCodeEnable())) { // 2015-12-18 add
                                            // https://github.com/billchen198318/bamboobsc/issues/5
     return;
   }
   Object sessCaptcha =
       SecurityUtils.getSubject()
           .getSession()
           .getAttribute(com.google.code.kaptcha.Constants.KAPTCHA_SESSION_KEY);
   String inputCaptcha = token.getCaptcha();
   if (!(sessCaptcha instanceof String) || StringUtils.isBlank(inputCaptcha)) {
     throw new IncorrectCaptchaException("captcha error!");
   }
   if (!inputCaptcha.equals(sessCaptcha)) {
     throw new IncorrectCaptchaException("captcha error!");
   }
 }