共 18 篇文章 |
|
if (token.toString().equals(token.getParams())){// sso密钥+用户名+日期,进行md5加密,举例: Digests.md5(secretKey+username+20150101))String secretKey = Global.getConfig("shiro.sso.secretKey");String password = Digests.md5(secretKey + token.getUsername() + DateUtils.getDate("yyyyMMdd"));if (passwor... 阅10670 转26 评0 公众公开 15-11-13 18:19 |
我的shiro之旅: 十 自定义shiro的SessionIdCookie.还有一种就是浏览器打开很久都没有操作,然后shiro定时清理了不活动的session,这时浏览器再发请求过来,因为session已被清理,也会抛There is no session with id。</bean> 我们打开shiro的DefaultWebSessionManager类源码就可以知道,里面有个private Cookie sessionIdCookie;属性,... 阅9109 转12 评0 公众公开 15-11-13 17:59 |
realm.supports(token)) { String msg = "Realm [" + realm + "] does not support authentication token [" + token + "]. Please ensure that the appropriate Realm implementation is "+ "configured correctly or that the realm accepts AuthenticationTokens of this type.";// Null username ... 阅775 转4 评0 公众公开 15-11-13 17:07 |
public Session resolveSession() { //这里则是直接从map中取出Session Session session = getSession(); if (session == null) { //try the Subject if it exists: //若果没有,尝试从map中取出Subject Subject existingSubject = getSubject(); if (existingSubject != null) { //这里就是Subject获取session的方法,需要详细看下 session = ... 阅9256 转8 评0 公众公开 15-11-13 15:54 |
阅236 转1 评0 公众公开 15-11-09 21:20 |
Shiro EHCache缓存配置。<ehcache updateCheck="false" name="shiroCache"> <defaultCache maxElementsInMemory="10000" eternal="false" timeToIdleSeconds="120" timeToLiveSeconds="120" overflowToDisk="false" diskPersistent="false" diskExp... 阅304 转4 评0 公众公开 15-11-03 21:54 |
阅929 转3 评0 公众公开 15-11-03 18:57 |
Shiro登录成功后自定义操作 | KetaYao''s Blog.import org.apache.shiro.authc.import org.apache.shiro.subject.import org.apache.shiro.web.filter.authc.import org.apache.shiro.web.util.* @see org.apache.shiro.web.filter.authc.FormAuthenticationFilter#onLoginSuccess(org.apache.shiro.authc.AuthenticationToken, org.ap... 阅754 转4 评0 公众公开 15-07-15 19:06 |
阅1244 转2 评0 公众公开 15-07-15 14:40 |
阅850 转2 评0 公众公开 15-07-15 14:38 |