July 2018
Intermediate to advanced
268 pages
7h 36m
English
Bind all the beans declared earlier to the authentication provider bean. We will be loading users from a static list provided as part of UserDetailsService in the authentication provider. In a production scenario, this will point to a database:
@Beanpublic CasAuthenticationProvider casAuthenticationProvider() { CasAuthenticationProvider provider = new CasAuthenticationProvider(); provider.setServiceProperties(serviceProperties()); provider.setTicketValidator(ticketValidator()); provider.setUserDetailsService((s) -> new User("casuser", "password", true, true, true, true, AuthorityUtils.createAuthorityList("ROLE_ADMIN"))); provider.setKey("CAS_PROVIDER_PORT_9090"); return provider;}
With this we are ready to set ...
Read now
Unlock full access