If you have been following the logical flow of Spring Security throughout the rest of this book, hopefully, you already know what comes next—the Authentication token must be inspected by an appropriate AuthenticationProvider object. CAS is no different, and as such, the final piece of the puzzle is the configuration of an o.s.s.cas.authentication.CasAuthenticationProvider object within AuthenticationManager.
Let's take a look at the following steps:
- First, we'll declare the Spring bean in the CasConfig.java file, as follows:
//src/main/java/com/packtpub/springsecurity/configuration/ CasConfig.java @Bean public CasAuthenticationProvider casAuthenticationProvider() { CasAuthenticationProvider ...