Spring Security has a strong integration capability with CAS, although it's not as tightly integrated into the security namespace style of configuration like the OAuth2 and LDAP integrations that we've explored thus far in the latter part of this book. Instead, much of the configuration relies on bean wiring and configuration by reference, from the security namespace elements to bean declarations.
The two basic pieces of CAS authentication when using Spring Security involve the following:
- Replacement of the standard AuthenticationEntryPoint implementation, which typically handles redirection of unauthenticated users to the login page with an implementation that redirects the user to the CAS server instead
- Processing the service ticket when the user is redirected back from the CAS server to the protected resource, through the use of a custom servlet...