Class CustomerUserDetails
java.lang.Object
org.springframework.security.core.userdetails.User
org.broadleafcommerce.profile.core.service.CustomerUserDetails
- All Implemented Interfaces:
Serializable,org.springframework.security.core.CredentialsContainer,org.springframework.security.core.userdetails.UserDetails
public class CustomerUserDetails
extends org.springframework.security.core.userdetails.User
Created in order to utilize the Customer's primary key to salt passwords with. This allows username changes without
requiring a password reset since the primary key should never change.
- Author:
- Phillip Verheyden (phillipuniverse)
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.security.core.userdetails.User
org.springframework.security.core.userdetails.User.UserBuilder -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCustomerUserDetails(Long id, String username, String password, boolean enabled, boolean accountNonExpired, boolean credentialsNonExpired, boolean accountNonLocked, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities) CustomerUserDetails(Long id, String username, String password, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities) -
Method Summary
Methods inherited from class org.springframework.security.core.userdetails.User
builder, equals, eraseCredentials, getAuthorities, getPassword, getUsername, hashCode, isAccountNonExpired, isAccountNonLocked, isCredentialsNonExpired, isEnabled, toString, withDefaultPasswordEncoder, withUserDetails, withUsername
-
Field Details
-
id
-
-
Constructor Details
-
CustomerUserDetails
public CustomerUserDetails(Long id, String username, String password, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities) -
CustomerUserDetails
public CustomerUserDetails(Long id, String username, String password, boolean enabled, boolean accountNonExpired, boolean credentialsNonExpired, boolean accountNonLocked, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)
-
-
Method Details
-
withId
-
getId
- Returns:
- the primary key of the Customer
-
setId
- Parameters:
id- the primary key of the Customer
-