November 2017
Intermediate to advanced
542 pages
14h 24m
English
Now that we have created CalendarUser from our provider details, we need to save that User account into our database using CalendarUserDao. We then return the CalendarUser email, as that is what we have been using in the JBCP calendar for the username, as follows:
//src/main/java/com/packtpub/springsecurity/authentication/ProviderConnectionSignup.java@Servicepublic class ProviderConnectionSignupimplements ConnectionSignUp { @Autowired private CalendarUserDao calendarUserDao; @Override public String execute(Connection<?> connection) {...calendarUserDao.createUser(user);return user.getEmail(); }}
Now, we have a local User account in our database based on the provider details.
Read now
Unlock full access