Sample download, installation, deployment, and operation guide for Web SSO:

Source: Internet
Author: User
  • The web-Sso sample is composed of three standard web applications and compressed into three ZIP files, downloaded from http://gceclub.sun.com.cn/wangyu/web-sso. Where ssoauth (http://gceclub.sun.com.cn/wangyu/web-sso/SSOAuth.zip) is the authentication service; ssowebdemo1 (http://gceclub.sun.com.cn/wangyu/web-sso/SSOWebDemo1.zip) and ssowebdemo2 (http://gceclub.sun.com.cn/wangyu/web-sso/SSOWebDemo2.zip) are two web applications used to demonstrate Single Sign-On. The reason why these three web applications are not packaged into war packages is that they cannot be directly deployed and must be modified according to the deployment environment of the readers. The deployment and running environment of the sample has certain requirements and must comply with the above standards of servlet2.3 J2EE containers to run (such as Tomcat 5, Sun Application Server 8, JBoss 4, etc ). In addition, the identity authentication service requires the jdk1.5 runtime environment. Jdk1.5 is used because the author uses a high-performance Java Collection class "concurrentmap" with thread-safe performance, which is only available in jdk1.5.
  • The three web applications can be deployed separately. They can be deployed on different machines, different operating systems, and different J2EE products, they are completely standard and platform-independent applications. However, there is a limitation that the domain names of the two demo1 and demo2 servers must be the same, this explains the relationship between cookies and domains and how to create a cross-domain WEB-SSO later.
  • Decompress the ssoauth.zip file, in the/WEB-INF/web. modify the "domainname" attribute in XML to reflect the actual application deployment. The domainname must be set to the domain name of the two single sign-on applications (demo1 and demo2. This domainname is irrelevant to the domain name of the machine currently deployed by the ssoauth service. My default setting is ".sun.com ". If the demo1 and demo2 machines do not have a domain name, enter an IP address or host name (for example, localhost). However, if you use an IP address or host name, demo1 and demo2 must be deployed on one machine. After setting, you may need to compress the ssoauth Directory into a war File Based on the selected J2EE container. You can use "jar-CVF ssoauth. War ssoauth/" to complete this function.
  • Decompress the ssowebdemo1 and ssowebdemo2 files and find the Web. xml file under them/WEB-INF/. modify several of the initialization parameters.
    <Init-param>
    <Param-Name> ssoserviceurl </param-Name>
    <Param-value> http://wangyu.prc.sun.com: 8080/ssoauth </param-value>
    </Init-param>
    <Init-param>
    <Param-Name> ssologinpage </param-Name>
    <Param-value> http://wangyu.prc.sun.com: 8080/ssoauth/login. jsp </param-value>
    </Init-param>
    Modify the ssoserviceurl and ssologinpage to the machine name, port number, and root path (ssoauth by default) of the ssoauth application to reflect the actual deployment. After the setting, you may need to compress the two directories ssowebdemo1 and ssowebdemo2 into two war files based on the selected J2EE container. You can use "jar-CVF ssowebdemo1.war ssowebdemo1/" to complete this function.
  • Enter the test URL (test. jsp) for the first web application, such as http://wangyu.prc.sun.com: 8080/ssowebdemo1/test. jsp. If it is the first access, it will automatically jump to the login interface, as shown in

  • Use one of the three accounts that comes with the system to log on (for example, Username: WangYu, password: WangYu). You can see the content of test. jsp: displays the current username and welcome information.
  • Enter the test URL (test. jsp) of the second web application in the same browser, for example, http://wangyu.prc.sun.com: 8080/ssowebdemo2/test. jsp. You will find that you can see test without logging on again. JSP content also displays the current user name and welcome information, and the welcome information clearly shows the current application name (demo2 ).
 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.