Atitit.单向sso  单点登录的设计与实现

Atitit.单向sso  单点登录的设计与实现

1. 单点登录sso 的三大解决方案 1

2. 新方案:密码管理器方案 1

3. 调用方 1

4. 自动登录登录 2

5. 主页跳转 2

1. 单点登录sso 的三大解决方案

Ca认证中心。。脱机与联机token方案

2. 新方案:密码管理器方案

适当改变b系统的登录界面,让其使用传递过去的用户名密码参数自动登录即可。。

3. 调用方

private static String getUrl() {

String s="http://localhost/ecsx/admin/order_stats.php?act=list";

try {

s=URLEncoder.encode(s"utf-8");

catch (UnsupportedEncodingException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

//http://localhost/ecsx/admin/privilege.php?act=login

//"http://localhost/ecsx/admin/order_stats.php?act=list"

return "http://localhost/ecsx/admin/privilege.php?act=login&gourl="+s;

}

 

 作者:: 老哇的爪子 Attilax 艾龙,  EMAIL:1466519819@qq.com

转载请注明来源: http://blog.csdn.net/attilax

 

4. 自动登录登录

Admin/temp/loginHtml

 <script defer="defer">

  if(UrlParm.parm('gourl'))

{

writeCookie("gourl",UrlParm.parm('gourl'),2);

}else

{

writeCookie("gourl","",2);

}

 document.getElementById("form7").submit();

    </script>

5. 主页跳转

Start.html

<!--  ati q17 -->

<script src="../../com.attilax/core/core.js"></script>

<script src="../../com.attilax/net/cookie.js"></script>

<script src="../com.attilax/core/core.js"></script>

<script src="../com.attilax/net/cookie.js"></script>

<script src="../com.attilax/net/req.js"></script>

<script src="../../com.attilax/net/req.js"></script>

<script>

try{

 var gourl=readCookie("gourl");

 //alert(gourl);

//alert(gourl);

 if(gourl!="")

 {

    window.location=gourl;

 }

}catch(e)

{

showErr(e);

}

</script>

6. 参考

paip.模块间同步登录SSO实现总结 - attilax的专栏 博客频道 - CSDN.NET.htm

Atitit. 单点登录sso 的解决方案 总结 - attilax的专栏 博客频道 - CSDN.NET.htm

原文地址:https://www.cnblogs.com/attilax/p/15198797.html