List of usage examples for org.apache.shiro.web.filter.authc FormAuthenticationFilter DEFAULT_USERNAME_PARAM
String DEFAULT_USERNAME_PARAM
To view the source code for org.apache.shiro.web.filter.authc FormAuthenticationFilter DEFAULT_USERNAME_PARAM.
Click Source Link
From source file:$.LoginController.java
License:Apache License
@RequestMapping(method = RequestMethod.POST) public String fail(@RequestParam(FormAuthenticationFilter.DEFAULT_USERNAME_PARAM) String userName, Model model) {//from w w w . j a va2 s.c o m model.addAttribute(FormAuthenticationFilter.DEFAULT_USERNAME_PARAM, userName); return "account/login"; }
From source file:apm.modules.sys.web.LoginController.java
License:Open Source License
/** * POSTFilter?//from w ww . j av a 2 s .c o m */ @RequestMapping(value = "${adminPath}/login", method = RequestMethod.POST) public String login(@RequestParam(FormAuthenticationFilter.DEFAULT_USERNAME_PARAM) String username, HttpServletRequest request, HttpServletResponse response, Model model) { //model.addAttribute(FormAuthenticationFilter.DEFAULT_USERNAME_PARAM, username); //model.addAttribute("isValidateCodeLogin", isValidateCodeLogin(username, true, false)); //return "modules/sys/sysLogin"; //,??,???f return "redirect:" + Global.getFrontPath() + "/login_result?flag=false"; }
From source file:cn.aozhi.songify.web.account.LoginController.java
License:Apache License
@RequestMapping(method = RequestMethod.POST) public String fail(@RequestParam(FormAuthenticationFilter.DEFAULT_USERNAME_PARAM) String userName, Model model) {//from w ww .ja v a 2s . com model.addAttribute(FormAuthenticationFilter.DEFAULT_USERNAME_PARAM, userName); return "account/login"; }
From source file:com.aistor.modules.sys.web.LoginController.java
License:Open Source License
/** * POSTFilter?/*from w w w .j a v a 2 s .co m*/ */ @RequestMapping(value = "login", method = RequestMethod.POST) public String login(@RequestParam(FormAuthenticationFilter.DEFAULT_USERNAME_PARAM) String userName, HttpServletRequest request, HttpServletResponse response, Model model) { model.addAttribute(FormAuthenticationFilter.DEFAULT_USERNAME_PARAM, userName); model.addAttribute("theme", getTheme(request, response)); return "modules/sys/sysLogin"; }
From source file:com.asiainfo.tfsPlatform.web.web.account.LoginController.java
License:Apache License
@RequestMapping(method = RequestMethod.POST) public String fail(@RequestParam(FormAuthenticationFilter.DEFAULT_USERNAME_PARAM) String userName, Model model) {//from w w w . j av a2s .co m model.addAttribute(FormAuthenticationFilter.DEFAULT_USERNAME_PARAM, userName); return "login"; }
From source file:com.crawlermanage.controller.auth.LoginController.java
License:Apache License
@RequestMapping(value = "/login", method = RequestMethod.POST) public String fail(@RequestParam(FormAuthenticationFilter.DEFAULT_USERNAME_PARAM) String userName, Model model) {/*from w ww .j a v a2 s. c o m*/ model.addAttribute(FormAuthenticationFilter.DEFAULT_USERNAME_PARAM, userName); return "redirect:/login"; }
From source file:com.cuisongliu.springboot.shiro.autoconfig.ShiroAutoConfig.java
License:Open Source License
private ServerFormAuthenticationFilter serverAuthenticationFilter() { ServerFormAuthenticationFilter filter = new ServerFormAuthenticationFilter(); if (springShiroProperties.getEnableRememberMe()) { filter.setRememberMeParam(FormAuthenticationFilter.DEFAULT_REMEMBER_ME_PARAM); }//from w w w . j a va 2 s .c o m filter.setUsernameParam(FormAuthenticationFilter.DEFAULT_USERNAME_PARAM); filter.setPasswordParam(FormAuthenticationFilter.DEFAULT_PASSWORD_PARAM); return filter; }
From source file:com.dbv.user.LoginController.java
License:Apache License
@RequestMapping(value = "/login", method = RequestMethod.POST) public String fail(@RequestParam(FormAuthenticationFilter.DEFAULT_USERNAME_PARAM) String userName, Model model) {//from www .j av a2s . co m model.addAttribute(FormAuthenticationFilter.DEFAULT_USERNAME_PARAM, userName); return "login"; }
From source file:com.fengduo.bee.web.controller.account.LoginController.java
License:Open Source License
/** * ?/*from w w w. j a v a2 s.com*/ * * @param userName * @param model * @return */ @RequestMapping(value = "/login", method = RequestMethod.POST) public String fail(@RequestParam(FormAuthenticationFilter.DEFAULT_USERNAME_PARAM) String userName, HttpServletRequest req, Model model) { String exceptionClassName = (String) req.getAttribute("shiroLoginFailure"); String error = null; if (UnknownAccountException.class.getName().equals(exceptionClassName)) { error = ",!"; } else if (IncorrectCredentialsException.class.getName().equals(exceptionClassName)) { error = "??/??!"; } else if (CaptchaInvalidException.class.getName().equals(exceptionClassName)) { error = "???,??!"; } else if (CaptchaException.class.getName().equals(exceptionClassName)) { error = "??!"; } else if (AccountException.class.getName().equals(exceptionClassName)) { error = "??/?!"; } else if (exceptionClassName != null) { error = "?!"; } if (StringUtils.isEmpty(exceptionClassName)) { String code = request.getParameter("captcha"); String phone = request.getParameter("username"); String pwd = request.getParameter("password"); if (StringUtils.equalsIgnoreCase(code, (String) session.getAttribute(ValidateCodeServlet.VALIDATE_CODE))) { updateShiroUser(phone, pwd); return "redirect:/user/setting"; } else { error = "??!"; } } model.addAttribute("errMsg", error); // ajax if (InvokeTypeTools.isAjax(req)) { response.setContentType("application/json"); PrintWriter writer = null; try { writer = response.getWriter(); } catch (IOException e1) { e1.printStackTrace(); } writer.print(JsonResultUtils.createJsonResult(ResultCode.ERROR, "", error)); writer.flush(); writer.close(); } return "account/login"; }
From source file:com.fengduo.spark.web.controller.account.LoginController.java
License:Open Source License
@RequestMapping(value = "/login", method = RequestMethod.POST) public String fail(@RequestParam(FormAuthenticationFilter.DEFAULT_USERNAME_PARAM) String userName, Model model) {/*from w w w. j av a 2 s. c o m*/ model.addAttribute(FormAuthenticationFilter.DEFAULT_USERNAME_PARAM, userName); return "account/login"; }