java.lang.Object
org.springframework.security.core.userdetails.User
org.broadleafcommerce.openadmin.server.security.service.user.AdminUserDetails
All Implemented Interfaces:
Serializable, org.springframework.security.core.CredentialsContainer, org.springframework.security.core.userdetails.UserDetails

public class AdminUserDetails extends org.springframework.security.core.userdetails.User
Extended DTO class to support salts based on the primary key of the admin user. This allows username changes for admin users.
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
    Modifier and Type
    Field
    Description
    protected Long
    ID of the persistent AdminUser
  • Constructor Summary

    Constructors
    Constructor
    Description
    AdminUserDetails(Long id, String username, String password, boolean enabled, boolean accountNonExpired, boolean credentialsNonExpired, boolean accountNonLocked, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)
     
    AdminUserDetails(Long id, String username, String password, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    void
    setId(Long id)
     
     
     

    Methods inherited from class org.springframework.security.core.userdetails.User

    builder, equals, eraseCredentials, getAuthorities, getPassword, getUsername, hashCode, isAccountNonExpired, isAccountNonLocked, isCredentialsNonExpired, isEnabled, withDefaultPasswordEncoder, withUserDetails, withUsername

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • AdminUserDetails

      public AdminUserDetails(Long id, String username, String password, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)
    • AdminUserDetails

      public AdminUserDetails(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

      public AdminUserDetails withId(Long id)
    • getId

      public Long getId()
      Returns:
      the primary key of the Admin User
    • setId

      public void setId(Long id)
      Parameters:
      id - the primary key of the Admin User
    • toString

      public String toString()
      Overrides:
      toString in class org.springframework.security.core.userdetails.User