602 Unstar Star 2K Fork 706

GVPbaomidou / kisso

不能吧,kv没有了,我看你的逻辑,还会从业务系统的本地cookie构建

Closed
梵语  Opened this issue

/**
* Token 为 null
* 执行以下逻辑
/
if ( token == null ) {
String jsonToken = KissoHelper.getJsonToken(request, encrypt, SSOConfig.getCookieName());
if ( jsonToken == null || "".equals(jsonToken) ) {
/
*
* 未登录请求
*/
logger.info("jsonToken is null.");
return null;
} else {
token = ReflectUtil.getConfigToken();
token = token.parseToken(jsonToken);

			/**
			 * 判断 Token 是否缓存至 session
			 * 减少解密次数、提高访问速度
			 */
			if ( SSOConfig.getCookieCache() && cache != null ) {
				cache.set(hashCookie(request), token);
			}
		}
	}
12260 jobob 1578914833 8194 teacheredu 1578914545 total 2 participants

Comments (8)

12260 jobob 1578914833
青苗 2015-03-30 19:50 owner

你没有理解这个段代码的意思,这个不是本地构建。 根据 cookie hash 内容作为 k , v 存放解密对象,减少字符串解密,json转为对象的次数。

12260 jobob 1578914833
青苗 2015-03-30 19:52 owner

Status changed to closed

8194 teacheredu 1578914545
梵语 2015-03-31 09:30

Status changed to reopened

8194 teacheredu 1578914545
梵语 2015-03-31 09:30

/** * Token 为 null * 执行以下逻辑 / if ( token == null ) { String jsonToken = KissoHelper.getJsonToken(request, encrypt, SSOConfig.getCookieName()); if ( jsonToken == null || "".equals(jsonToken) ) { /* * 未登录请求 */ logger.info("jsonToken is null."); return null; } else { token = ReflectUtil.getConfigToken(); token = token.parseToken(jsonToken);

12260 jobob 1578914833
青苗 2015-04-01 08:47 owner

Status changed to closed

12260 jobob 1578914833
青苗 2015-04-01 08:49 owner

Status changed to reopened

12260 jobob 1578914833
青苗 2015-04-01 08:50 owner

缓存 、 cookie 同时不存在退出, cookie 存在重新设置缓存, 请仔细看源码。

12260 jobob 1578914833
青苗 2015-04-01 08:50 owner

Status changed to closed

Sign in to comment

Assignees
Labels
Not set
Projects
Milestones
Branches
Planed to start
Not set
Planed to end
Not set
Top level
Priority
Java
1
https://gitee.com/baomidou/kisso.git
git@gitee.com:baomidou/kisso.git
baomidou
kisso
kisso

Search

132457 8cb2edc1 1899542 131848 70c8d3a4 1899542