O'Reilly logo

Spring Security - Third Edition by Peter Mularien, Robert Winch, Mick Knutson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required