shiroWeb项目-登陆与退出实现(九)
原理
使用FormAuthenticationFilter过虑器实现 ,原理如下:
将用户没有认证时,请求loginurl进行认证,用户身份和用户密码提交数据到loginurl
FormAuthenticationFilter拦截住取出request中的username和password(两个参数名称是可以配置的)
FormAuthenticationFilter调用realm传入一个token(username和password)
realm认证时根据username查询用户信息(在Activeuser中存储,包括 userid、usercode、username、menus)。
如果查询不到,realm返回null,FormAuthenticationFilter向request域中填充一个参数(记录了异常信息)
登陆页面
由于FormAuthenticationFilter的用户身份和密码的input的默认值(username和password),修改页面的账号和密码 的input的名称为username和password
代码控制:(只对错误进行控制,认证过程由realm传递给Authenticator认证信息)
package cn.qlq.springmvc.controller; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession; import org.apache.shiro.authc.IncorrectCredentialsException;
import org.apache.shiro.authc.UnknownAccountException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping; import cn.qlq.springmvc.Exception.MyException;
import cn.qlq.springmvc.pojo.ActiveUser;
import cn.qlq.springmvc.service.SysService; @Controller
public class LoginController { @Autowired
private SysService sysService; // 登陆提交地址,和applicationContext-shiro.xml中配置的loginurl一致
@RequestMapping("/login.action")
public String login(HttpServletRequest request) throws Exception { // 如果登陆失败从request中获取认证异常信息,shiroLoginFailure就是shiro异常类的全限定名
String exceptionClassName = (String) request.getAttribute("shiroLoginFailure");
// 根据shiro返回的异常类路径判断,抛出指定异常信息
if (exceptionClassName != null) {
if (UnknownAccountException.class.getName().equals(exceptionClassName)) {
// 最终会抛给异常处理器
throw new MyException("账号不存在");
} else if (IncorrectCredentialsException.class.getName().equals(exceptionClassName)) {
throw new MyException("用户名/密码错误");
} else if ("randomCodeError".equals(exceptionClassName)) {
throw new MyException("验证码错误 ");
} else {
throw new Exception("不是账户错误,也不是密码错误");// 最终在异常处理器生成未知错误
}
}
// 此方法不处理登陆成功(认证成功),shiro认证成功会自动跳转到上一个请求路径
// 登陆失败还到login页面
return "login";
} }
认证过滤拦截器
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAdcAAAA4CAIAAAAggyV1AAAGb0lEQVR4nO2dO5LiMBBAORcJexMSyregahNyQk4wF6CKlISIKkIiEkgIiCfXBt4xsj4tYWxLI96rqVmwJKv9e24a7+5EAQBAOiapAwAA+GiwMABASrAwAEBKsDAAQEqwMABASrAwAEBKsDAAQEqwMABASrAwAEBKsDAAQEqwMABASrAwAEBKsDAAQEo+ycKn82y+X53GnPL7a7lfbL/bCx+r+fng7i805cths59tHqmj6I/TeTbf1z/jni3woXyShe/XxcjX1ek806x62x4X22+lHqvl9abUYfMMRmjKiPbmNAxn4dl8b7w1lth9+uOxcp0t8dPJPevWRvf6j2+4vTfiY/DNIq8qOEVfO1+OxznLYMc9AYVa+H5d2L4Y3cKHjZEIP1bz/Wx5Xm3Oq+W+bTShKRvGsrDtI6d/m9Yep9YIWNjWqBBbUCsxovGNcqrcOXW84oWFvg6+MHzxOAPzLQnuXuEe0537dTE/ft37WZlAiRY+nWdzuw4wuoV9h1A4tGMd9Y6MaGHhrYq+4N/DYWF9/fpvX8zdjOPjpeRX6NBXOh8ZkvJvvnBXaJZ3OLg93pgPm/1seGmUZuHb9ujda+Na+LY9Wm76/lpqCe/yeotqGgCt9KnPZfi0eVvvVeOnuc/V3Z59zOC/v5aOUQKRn5flJmFzlFLqdJ4tr7f6I4i7BCzlwnJmp0La1ZviLfOOgCInknPYzre9zhYWWt/cUfHUJ3bMeduZoix82OxnQi45aqbpuIb7rgs/DeJUqpf7dfF002M1f7pJ0pYSc+HnSh6r1inbWn8kxuXtu+CDRghYeP48W27bo7Vp5hF0TmRIWVhib6Ozydhku8mIxznc7iPcNmQp2wuFAASDy+t0HtbIIfJ0/XC/Ll4/jeMpxsJ1wiWXUx8rh4XbLmtZTGgK4RHWz2ozekZCd1N3C3tG3bbHDnm9cTn5Lubg9RyysHYyOO7QUd/OBS0smyiym/NtcLgRj5zAxhvTWK0QYT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oa1nJJS+CsvdPCMBkDnlWDjzkjAAgJNiLPxLJFz2P6wOAK9TjIV/Azn8J0PoGCAzsPBY5JAFo2CA/MDCAAApwcIAACnBwgAAKcHCAAApwcIAACnBwgAAKcHCAAApwcIAACn5B4JFmZK+yoc0AAAAAElFTkSuQmCC" alt="" />
--------------------------------------------退出-------------------------------
使用LogoutFilter
不用我们去实现退出,只要去访问一个退出的url(该 url是可以不存在),由LogoutFilter拦截住,清除session。
在applicationContext-shiro.xml配置LogoutFilter:
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeUAAAAtCAIAAAAfnuRYAAAGnUlEQVR4nO2cPa7qPBCGWRcN305oELtAug09JSs4G0CipaFCoqSigYaCmj5fkZDYY8/YDnFsw/sIXRH8E4/teTMeOHdSAQAAKIFJ6gEAAADwAnoNAABlAL0GAIAygF4DAEAZQK8BAKAMstTr82U2P6zPqYcRyvkymx/qV3mDj8T5MpsfFrtX6nEMxnF7mG2fUo2vMzkWmKhwstTrx20RWfJm84PzE66Cq+ZznVyvz5fZ/HLM4V6D+iSZeetC9FjZIFLptacVw1aLC/Q6nNR6/bgtTG+Pr9fVe8u2ETF5cfXN9wbQ61iUoddxEIzl9jApNVvFH3WxPG6L+envkXoYBkn1mnvAjqLXBKufyy+mJ+h1LMgRR9Ujs47wySdkpdfm55z51tMhJFvguM0xsZlMr++7Ezsd4+q1pxB7b267Xtf2Nq/V7c4V6elvrhVRjfbS7CrgyKnk38kIq+r1t6IdOu4lZvMFuxa7V+0qs/mBPAlMvTZDRVOY+qmSbl03jHqqu1J1ogSTz5fZ6navnmtbBW42/GMFoQ55tpkNnSYT08jjSmjFFkXYGzGoR5JVxiaNXh+3h5lw3Ih/GDE3vdWriRD4SYBFr49bdXu9/lbdRrzvTl2R/kWr0IrT66rrJ3A3P26LrofnWnNLcqnjuFfYbDTe2NzruX57C5EhTpJInbZUeAyHGsWNUDb5rVDNrlYXXZgNFc/xc1JOLi1zwpusbdF6hO1mEFbfvQmH2R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LTUEuGwwAFzZAkOAGwgBwC0sMAQAALcgBABApYQAAKiUEAAAlRICAKBSQgAAVEoIAIBKCQEAUCkhAAAqJQQAQKWEAAColBAAAJUSAgCgUkIAAFRKCACASgkBAFApIQAAKiUEAEClhAAAqJQQAACVEgIAoFJCAABUSggAgEoJAQBQKSEAAColBABApYQAAKiUEAAAlfo/OWXnTKd/zX0AAAAASUVORK5CYII=" alt="" />
shiroWeb项目-登陆与退出实现(九)的更多相关文章
- ajax实现用户登陆,退出,java做后端
最近http老师布置了个任务,用cookie完成登陆,退出.Http老师讲的是node.js写后端,由于自己还是擅长java些,还是用Java做了. 以前跟着教程写过一个网站,当初是用jsp+serv ...
- mysql常用命令行操作(一):登陆、退出、查看端口、修改密码、刷新
一.登陆和退出mysql mysql -u root -p # 登陆exit # 退出 二.查看当前mysql的端口号 show global variables like 'port'; 三.查看用 ...
- 大项目之网上书城(九)——订单Demo
目录 大项目之网上书城(九)--订单Demo 主要改动 1.OrderServiceImpl 代码 2.OrderDaoImpl 代码 3.OrderitemDaoImpl 代码 4.orderite ...
- thinkphp5项目--企业单车网站(九)(加强复习啊)(花了那么多时间写的博客,不复习太浪费了)
thinkphp5项目--企业单车网站(九)(加强复习啊)(花了那么多时间写的博客,不复习太浪费了) 项目地址 fry404006308/BicycleEnterpriseWebsite: Bicyc ...
- yii2 后台前后台 前后台登陆、退出问题
问题描述:我使用前后台分离 配置如下: 'user' => [ 'identityClass' => 'app\models\User', 'enableAutoLogin' => ...
- mysql 登陆与退出
Mysql登陆与退出 登陆参数 登陆命令 mysql -uroot -p 回车输入密码 退出有三个命令: exit quit \q 修改mysql提示符 连接mysql客户端时通过参数指定: 登 ...
- shiroWeb项目-记住我(自动登陆实现)(十五)
用户登陆选择“自动登陆”本次登陆成功会向cookie写身份信息,下次登陆从cookie中取出身份信息实现自动登陆. 用户身份实现java.io.Serializable接口便于反序列化 package ...
- (一)Spring Security Demo 登陆与退出
文章目录 配置springSecurityFilterChain过滤器 配置身份验证 加载配置 登陆项目 退出 下面的代码需要spring环境的支持: 看这个系列博客之前,需要这个博客,大概了解下 s ...
- Android 开源项目维护者宣布退出
Android开源项目(Android Open Source Project,AOSP)的长期维护者Jean-Baptiste Quéru在Google+上宣布退出,他退出AOSP项目的原因被认为与 ...
随机推荐
- PythonProject(1)vim的Hustoj插件
打算写一个vim的插件,或者emacs的插件.可以在编辑器里打比赛,看rank,交代码.总之相当于一个桌面版的hustoj 这是上学期就有的一个脑洞产物,昨天学了Python的爬虫,发现这个东西很有实 ...
- KMP模板(KMP)
放一个模板在这里搞事情...... 学KMP的话找SYCstudio吧(博客链接) 代码(多组数据,\(O(n)\)求一个串是否在另一个串里出现过) #include<cstdio> #d ...
- NOI2018退役记
NOI2018退役记 终于我也退役了-- Day0 高中毕业前最后一次坐飞机了--在机场干什么呢?当然是打元气打元气打元气.下飞机干什么呢?当然是打元气打元气打元气. 有接机服务,大巴上有个导游,又向 ...
- bzoj4504 K个串 (优先队列+主席树)
首先如果没有出现次数的限制的话,这题就是超级钢琴 但由于有了这个限制,不能简单地用前缀和 考虑顺着做的时候每个点的贡献,如果a[i]=x,x上次出现位置是lst[x](可以用一个map来记),那它会给 ...
- 端午漫谈(附:Ubuntu18.04下轻量截图软件)
先说声端午快乐- 有空就陪陪家人吧.今天陪外公吃了顿饭,陪老人家聊了会天,颇有点感触.发现技术真的是改变生活,小孩抖音自学跳舞,大人微信刷又刷,很多天海一方的老朋友都可以联系到了... 其实最有感触的 ...
- 【POJ1741】Tree
题目大意:给定一棵 N 个节点的无根树,边有边权,统计树上边权和不大于 K 的路径数. 对于每条树上路径,对于每一个点来说,该路径只有经过该点和不经过该点两种情况,对于不经过该点的情况,可以转化成是否 ...
- UIManager的字体颜色参数对照表
FileChooser.fileTypeHeaderTextTextArea.margincom.sun.java.swing.plaf.windows.WindowsSplitPaneUIcom.s ...
- Linux追加文件内容并在内容前加上该文件名(awk, FILENAME功能妙用)
假如有三个文件file1.txt,file2.txt,file3.txt 每一个文件内容如下: 现在打算提取每一个文件字符为16的行,打印该行所有的内容.以及该文件名,并追加到file4.txt,则可 ...
- 原生JS和JQ窗口定位属性对照表
位置 javascript jquery 兼容性 窗口位置离屏幕左偏移 var leftPos = (typeof window.screenLeft == "number") ? ...
- 结尾非零数的奇偶性(问题来源于PythonTip)
给你一个正整数列表 L, 判断列表内所有数字乘积的最后一个非零数字的奇偶性.如果为奇数输出1,偶数则输出0.. 例如:L=[2,8,3,50] 则输出:0 L = [2,8,3,50] c2 = 0 ...