主题 : 请问是如何实现多个站点单点登录的? |
级别: 秀才
|
2# 发表于:2010-03-22 17:49:52 IP:124.43.*.*
如果是子域的话,jeecms将jsessionid存为本地cookie:
// 保存当前登录信息 contextPvd.setSessionAttr(User.USER_KEY, user.getId()); contextPvd.setSessionAttr(Member.MEMBER_KEY, member.getId()); // 处理次级域名单点登录 Website web = getWeb(); if (!StringUtils.isBlank(web.getBaseDomain())) { Cookie c = new Cookie(JSESSION_COOKIE, contextPvd .getSessionId(false)); c.setPath("/"); c.setDomain(web.getTopDomain(true)); contextPvd.addCookie(c); } 如果需要做跨域单点登录就比较复杂了:) |
||
---|---|---|---|
1
共1页