Single Sign-on Windows implementation

Source: Internet
Author: User
Tags cas

Windows implementation steps:

Server.xml Modification Method

Hosts modify mode

CAS Client Configuration

CAS configuration filter.txt content is as follows:

    <!--======================== Single Sign-on start ======================== -        <!--for single-point exit, this filter is used for single-point logout functions, optional configuration -      <Listener>          <Listener-class>Org.jasig.cas.client.session.SingleSignOutHttpSessionListener</Listener-class>      </Listener>      <!--This filter is used to implement the single-point logout function, optional configuration.  -      <Filter>          <Filter-name>CAS Single Sign Out Filter</Filter-name>          <Filter-class>Org.jasig.cas.client.session.SingleSignOutFilter</Filter-class>      </Filter>      <filter-mapping>          <Filter-name>CAS Single Sign Out Filter</Filter-name>          <Url-pattern>/*</Url-pattern>      </filter-mapping>      <!--This filter is responsible for the user's certification work and must be enabled -      <Filter>          <Filter-name>Casfilter</Filter-name>          <Filter-class>Org.jasig.cas.client.authentication.AuthenticationFilter</Filter-class>          <Init-param>              <Param-name>Casserverloginurl</Param-name>              <!--This is the address of the CAS server, you must use the domain name you created, or the authentication certificate does not pass -            <Param-value>Https://www.bhz.com:8443/cas/login</Param-value>          </Init-param>          <Init-param>              <Param-name>ServerName</Param-name>             <!--the server here is the IP of the service side -               <Param-value>http://localhost:8080</Param-value>          </Init-param>      </Filter>      <filter-mapping>          <Filter-name>Casfilter</Filter-name>          <Url-pattern>/*</Url-pattern>      </filter-mapping>      <!--the filter is responsible for verifying the ticket, and it must be enabled -      <Filter>          <Filter-name>CAS Validation Filter</Filter-name>          <Filter-class>Org.jasig.cas.client.validation.Cas20ProxyReceivingTicketValidationFilter</Filter-class>          <Init-param>              <Param-name>Casserverurlprefix</Param-name>              <!--This is the address of the CAS server, you must use the domain name you created, or the authentication certificate does not pass -            <Param-value>Https://www.bhz.com:8443/cas</Param-value>          </Init-param>          <Init-param>              <Param-name>ServerName</Param-name>              <Param-value>http://localhost:8080</Param-value>          </Init-param>      </Filter>      <filter-mapping>          <Filter-name>CAS Validation Filter</Filter-name>          <Url-pattern>/*</Url-pattern>      </filter-mapping>      <!--the filter is responsible for implementing the package requested by the HttpServletRequest, such as allowing the developer to obtain the login name of the SSO login user through the HttpServletRequest getremoteuser () method, optional configuration.  -      <Filter>          <Filter-name>CAS HttpServletRequest Wrapper Filter</Filter-name>          <Filter-class>Org.jasig.cas.client.util.HttpServletRequestWrapperFilter</Filter-class>      </Filter>      <filter-mapping>          <Filter-name>CAS HttpServletRequest Wrapper Filter</Filter-name>          <Url-pattern>/*</Url-pattern>      </filter-mapping>      <!--This filter allows developers to get the user's login name through Org.jasig.cas.client.util.AssertionHolder.      such as Assertionholder.getassertion (). Getprincipal (). GetName ().  -      <Filter>          <Filter-name>CAS Assertion Thread Local Filter</Filter-name>          <Filter-class>Org.jasig.cas.client.util.AssertionThreadLocalFilter</Filter-class>      </Filter>      <filter-mapping>          <Filter-name>CAS Assertion Thread Local Filter</Filter-name>          <Url-pattern>/*</Url-pattern>      </filter-mapping>       <!--======================== Single Sign-on end ======================== -      <!--automatically set the user information of the system according to the results of single sign-on -         <Filter>        <Filter-name>Authvalidatefilter</Filter-name>        <Filter-class>Bhz.com.util.AuthValidateFilter</Filter-class>    </Filter>    <filter-mapping>        <Filter-name>Authvalidatefilter</Filter-name>        <Servlet-name>Bhz-sys</Servlet-name>    </filter-mapping>    
View Code

Single Sign-on Windows implementation

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.