• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Integrating CAS with Spring Security

 
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic