Professional Documents
Culture Documents
P 90
P 90
DomainUsernamePasswordAuthenticationToken
When a user authenticates, Spring Security submits an Authentication object to
AuthenticationProvider with the information provided by the user. The current
UsernamePasswordAuthentication object only contains a username and password
field. Create a DomainUsernamePasswordAuthenticationToken object that contains
a domain field.
src/main/java/com/packtpub/springsecurity/authentication/
DomainUsernamePasswordAuthenticationToken.java
Updating CalendarUserAuthenticationProvider
Now, we need to update CalendarUserAuthenticationProvider to utilize the
domain field.
src/main/java/com/packtpub/springsecurity/authentication/
CalendarUserAuthenticationProvider.java
[ 67 ]