CAS single-point java,php client skips SSL authentication and logs in HTTP form

Source: Internet
Author: User
CAS single-point java,php client skips SSL authentication, logs in in HTTP mode


Here can simply say the content of the changes, but also before the online inquiry!

The following are the modifications to the jar package and the corresponding configuration instructions that the java,php client needs to modify!

?

1.\web-inf\deployerconfigcontext.xml

< Bean? class = "Org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler"

?????????????????? P:httpclient-ref = "HttpClient"? />

????????? Add parameter p:requiresecure= "false" , whether security verification is required, that is, HTTPS , false To not adopt, plus go after following:

< span="">

??????????????????????????????????????????????? p:httpclient-ref= "HttpClient"?? P:requiresecure= "false"/>

?

?

2.?????? \web-inf\ Cas-servlet.xml

< Bean? ID = "Warncookiegenerator"? class = "Org.jasig.cas.web.support.CookieRetrievingCookieGenerator"

??????? p:cookiesecure = "false"

??????? P:cookiemaxage = "-1"

??????? P:cookiename = "Casprivacy"

??????? P:cookiepath = "/cas"? />

Parameters p:cookiesecure= "true" , in the same vein HTTPS validation related, TRUE to adopt HTTPS validation, and Deployerconfigcontext.xml the parameters remain consistent.

Parameters p:cookiemaxage= "-1" , simply said to be Cookies 's maximum life cycle, -1 Is not a life cycle, that is, only the currently open IE window is valid, IE When you close or reopen another window, validation is still required.

?

< Bean? ID = "Ticketgrantingticketcookiegenerator"? class = "Org.jasig.cas.web.support.CookieRetrievingCookieGenerator"

??????? p:cookiesecure = "false"

??????? P:cookiemaxage = "-1"

??????? P:cookiename = "CASTGC"

??????? P:cookiepath = "/cas"? />

Two parameters are the same as above.

Description : If p:cookiesecure= "true"? indicates that only HTTPS request to read Cookies and the value in the http access is not available from Cookies The value that is taken in the.

?

?

?

?

Modifications to the Java client:

The following green section is the modification section, replacing the original HTTPS address with an HTTP

? ?

??? ?? Casfilter

??? ?? edu.yale.its.tp.cas.client.filter.CASFilter ?

?? ??? ?

??????? ?? edu.yale.its.tp.cas.client.filter.loginUrl ?

??????? ?? http://localhost:8080/cas/login ?

???? ? ?

???? ? ?

?????? ??? edu.yale.its.tp.cas.client.filter.validateUrl ?

???????? ? http://localhost:8080/cas/proxyValidate ?

???? ? ?

?? ??? ?

??????? ?????? edu.yale.its.tp.cas.client.filter.serverName ?

????????????? localhost:8088 ?

???? ? ?

?

????? casfilter ?

????? /* ?

?

?


  • Related Article

    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.