Professional Documents
Culture Documents
Adding Openid Users: Insert Into Calendar - Users (Id, Openid, Email, Password, First - Name, Last - Name) Values (0,' ',)
Adding Openid Users: Insert Into Calendar - Users (Id, Openid, Email, Password, First - Name, Last - Name) Values (0,' ',)
You'll note that this is similar to our traditional username and password-based
admin account, with the exception that we have added an additional column for the
OpenID to act as another alias for the user.
CalendarUserDetailsService lookup by
OpenID
We have included code from the custom authentication we did in Chapter 3,
Custom Authentication. Previously, we linked Spring Security's UserDetails to our
CalendarUser using its e-mail property. However, the username will now be an
OpenID rather than an e-mail,
so we need to update our CalendarUserDetailsService to lookup the
CalendarUser user by OpenID. Go ahead and make the following changes:
src/main/java/com/packtpub/springsecurity/core/userdetails/
CalendarUserDetailsService.java
[ 195 ]