java.lang.Object
cn.herodotus.engine.oauth2.core.definition.domain.HerodotusUser
所有已实现的接口:
Serializable, org.springframework.security.core.CredentialsContainer, org.springframework.security.core.userdetails.UserDetails

public class HerodotusUser extends Object implements org.springframework.security.core.userdetails.UserDetails, org.springframework.security.core.CredentialsContainer
作者:
gengwei.zheng
另请参阅:
  • 构造器详细资料

    • HerodotusUser

      public HerodotusUser()
    • HerodotusUser

      public HerodotusUser(String userId, String username, String password, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)
      Calls the more complex constructor with all boolean arguments set to true.
    • HerodotusUser

      public HerodotusUser(String userId, String username, String password, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities, Set<String> roles)
      Calls the more complex constructor with all boolean arguments set to true.
    • HerodotusUser

      public HerodotusUser(String userId, String username, String password, boolean enabled, boolean accountNonExpired, boolean credentialsNonExpired, boolean accountNonLocked, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities, Set<String> roles)
      Construct the User with the details required by org.springframework.security.authentication.dao.DaoAuthenticationProvider
      参数:
      username - the username presented to the DaoAuthenticationProvider
      password - the password that should be presented to the DaoAuthenticationProvider
      enabled - set to true if the user is enabled
      accountNonExpired - set to true if the account has not expired
      credentialsNonExpired - set to true if the credentials have not expired
      accountNonLocked - set to true if the account is not locked
      authorities - the authorities that should be granted to the caller if they presented the correct username and password and the user is enabled. Not null.
      抛出:
      IllegalArgumentException - if a null value was passed either as a parameter or as an element in the GrantedAuthority collection
  • 方法详细资料

    • getAuthorities

      public Collection<org.springframework.security.core.GrantedAuthority> getAuthorities()
      指定者:
      getAuthorities 在接口中 org.springframework.security.core.userdetails.UserDetails
    • getPassword

      public String getPassword()
      指定者:
      getPassword 在接口中 org.springframework.security.core.userdetails.UserDetails
    • getUsername

      public String getUsername()
      指定者:
      getUsername 在接口中 org.springframework.security.core.userdetails.UserDetails
    • isEnabled

      public boolean isEnabled()
      指定者:
      isEnabled 在接口中 org.springframework.security.core.userdetails.UserDetails
    • isAccountNonExpired

      public boolean isAccountNonExpired()
      指定者:
      isAccountNonExpired 在接口中 org.springframework.security.core.userdetails.UserDetails
    • isAccountNonLocked

      public boolean isAccountNonLocked()
      指定者:
      isAccountNonLocked 在接口中 org.springframework.security.core.userdetails.UserDetails
    • isCredentialsNonExpired

      public boolean isCredentialsNonExpired()
      指定者:
      isCredentialsNonExpired 在接口中 org.springframework.security.core.userdetails.UserDetails
    • eraseCredentials

      public void eraseCredentials()
      指定者:
      eraseCredentials 在接口中 org.springframework.security.core.CredentialsContainer
    • getUserId

      public String getUserId()
    • getRoles

      public Set<String> getRoles()
    • equals

      public boolean equals(Object o)
      Returns true if the supplied object is a User instance with the same username value.

      In other words, the objects are equal if they have the same username, representing the same principal.

      覆盖:
      equals 在类中 Object
    • hashCode

      public int hashCode()
      Returns the hashcode of the username.
      覆盖:
      hashCode 在类中 Object
    • toString

      public String toString()
      覆盖:
      toString 在类中 Object