November 2017
Intermediate to advanced
542 pages
14h 24m
English
Up to this point, we have needed two different representations of users: one for Spring Security to make security decisions, and one for our application to associate our domain objects to. Create a new class named CalendarUserDetailsService that will make Spring Security aware of our CalendarUser object. This will ensure that Spring Security can make decisions based upon our domain model. Create a new file named CalendarUserDetailsService.java, as follows:
//src/main/java/com/packtpub/springsecurity/core/userdetails/CalendarUserDetailsService.java// imports and package declaration omitted@Componentpublic class CalendarUserDetailsService implementsUserDetailsService {private final CalendarUserDao calendarUserDao; ...Read now
Unlock full access