cas--for Single Sign-on

Source: Internet
Author: User

Then the previous article, has configured The CAS service, next in my demo of the two applications in the configuration can be achieved single-point of login. We have two modules in our freshman enrollment to configure the client.

Application 1 :

<configSections> <section name= "EntityFramework" type= " System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, version=4.4.0.0, Culture=neutral, publickeytoken=b77a5c561934e089 "requirepermission=" false "/> <!--cas start-up <section name=" casclientconf IG "type=" DotNetCasClient.Configuration.CasClientConfiguration, dotnetcasclient "/> <!--CAs End--</ Configsections> <!--CAs start-up-<!--published by each system-<casclientconfig casserverloginurl= "/http/                   192.168.24.94:8988/cas-end/login "casserverurlprefix=" http://192.168.24.94:8988/cas-end/"                   Servername= "http://localhost:4829/" redirectaftervalidation= "true" renew= "false" Singlesignout= "true" Ticketvalidatorname= "CAS20" Serviceticketmanager = "Cacheserviceticketmanager"/> <!--CAs End--<!--cas Start--<authentication mode= "Forms" > <forms loginurl= "http://192.168.24.94:8988/cas-end/login" timeout= "Defaul"            Turl= "~/freshstudentreport/freshstudentreport" cookieless= "UseCookies" slidingexpiration= "true"/> <!--path= "/netcasclient"-</authentication> <authorization> <deny users= "?" /> </authorization> <!--cas-closed <!--cas start-up 

Application 2 :

the configuration with application 1 is the same, because all are first to a CAS Certification Center certification. This is the two customer single application is configured.


             the effect of a normal single sign-on is that users only have to log in once to access all trusted applications, that is, the two applications , when the first login succeeds, the second app can be logged in without entering cas End authenticated user name and password, jump directly into the system.

             After everything has been configured to realize the effect of single sign-on, but for cas It's always too much to backfire. In application1 After successful login, application2 did not jump directly, but need to re-login. With the help of Acer, Daniel finally realized it. Modified cas client configuration. The procedure is Jiangzi:

Set The following property to true in the Ticketgrantingticketcookiegenerator.xml file .


Then apply 1 login,



Application 2 allows you to access your own interface directly:


At this point, the effect of single sign-on is realized.

This is the reason why the server is not configured properly. In front of Daniel, I did a demo as if it was tricks, some problems do not know how to solve. However, after solving the single sign-on, our biggest problem is coming, or the single-point logout problem, has not been achieved. The reason is that the cache is not clear how clear ...

later adopted a more stupid and will make people laugh, temporarily in my this is to realize the exit, and jump to the login home page. I am Jiangzi do it:

Link to the home page of the current app after exiting, so the app wants to log in first through CAS

Redirect ("Http://192.168.24.94:8988/cas/logout?service=http://localhost:52012/DistributeClass/Index"); Casauthentication.singlesignout ();

but ... This seems to be no, I have only two application, for our cloud platform, because I did not test, cannot guarantee the next time the same user login can jump to his module, the cache is not clear, always not, At that time, I was naïve to think that I solved the problem, temporarily happy, but after the Big Bend Daniel added to our cloud platform or can not realize, my efforts these days seem to have been wasted, and did not change what ... Seek Comfort ...


cas--for Single Sign-on

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.