wood burning stoves 2.0*
The moose likes Spring and the fly likes Integrating CAS with Spring Security Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Integrating CAS with Spring Security" Watch "Integrating CAS with Spring Security" New topic
Author

Integrating CAS with Spring Security

Dan King
Ranch Hand

Joined: Mar 18, 2009
Posts: 84
I'd like to integrate CAS with Spring Security; however, I want to continue to use the custom login page I created for Spring Security or customize the CAS login page to look like the rest of the application. Is this possible? If yes, are they any documents, examples, etc. that show how to do this? Thanks.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

Dan King wrote:I'd like to integrate CAS with Spring Security; however, I want to continue to use the custom login page I created for Spring Security or customize the CAS login page to look like the rest of the application. Is this possible? If yes, are they any documents, examples, etc. that show how to do this? Thanks.


What you want to look into is the UserDetailsService interface. This is the interface that Spring Security uses, calls to log someone in. There is one method
loadUserByUserName. If you want to you can implement your own and just have it call out to CAS to get the information it needs, Username, password and roles/authorities the user has. Put that information into a UserDetails object and return it from the method.

I believe though that there are already implementation of UserDetailsService for CAS, and if I recall correctly they are in the Spring Security jars.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Integrating CAS with Spring Security
 
Similar Threads
Is here anyone have used the Yale's CAS SSO solution?pls help me,I am in puzzle!
Spring 3 and SSO
How display errormessage from model on jsp page?
CAS using Spring security
Spring security: pass additional parameter when performing login