Proving authenticity with the CasAuthenticationProvider object

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:

  1. 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 ...

Get Spring Security - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.