public class HerodotusUser extends Object implements org.springframework.security.core.userdetails.UserDetails, org.springframework.security.core.CredentialsContainer
| 构造器和说明 |
|---|
HerodotusUser() |
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,
String employeeId,
String avatar)
Construct the
User with the details required by
org.springframework.security.authentication.dao.DaoAuthenticationProvider |
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(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. |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
equals(Object o)
Returns
true if the supplied object is a User instance with the
same username value. |
void |
eraseCredentials() |
Collection<org.springframework.security.core.GrantedAuthority> |
getAuthorities() |
String |
getAvatar() |
String |
getEmployeeId() |
String |
getPassword() |
Set<String> |
getRoles() |
String |
getUserId() |
String |
getUsername() |
int |
hashCode()
Returns the hashcode of the
username. |
boolean |
isAccountNonExpired() |
boolean |
isAccountNonLocked() |
boolean |
isCredentialsNonExpired() |
boolean |
isEnabled() |
String |
toString() |
public HerodotusUser()
public HerodotusUser(String userId, String username, String password, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)
true.public HerodotusUser(String userId, String username, String password, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities, Set<String> roles)
true.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, String employeeId, String avatar)
User with the details required by
org.springframework.security.authentication.dao.DaoAuthenticationProviderusername - the username presented to the
DaoAuthenticationProviderpassword - the password that should be presented to the
DaoAuthenticationProviderenabled - set to true if the user is enabledaccountNonExpired - set to true if the account has not expiredcredentialsNonExpired - set to true if the credentials have not
expiredaccountNonLocked - set to true if the account is not lockedauthorities - 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 collectionpublic Collection<org.springframework.security.core.GrantedAuthority> getAuthorities()
getAuthorities 在接口中 org.springframework.security.core.userdetails.UserDetailspublic String getPassword()
getPassword 在接口中 org.springframework.security.core.userdetails.UserDetailspublic String getUsername()
getUsername 在接口中 org.springframework.security.core.userdetails.UserDetailspublic boolean isEnabled()
isEnabled 在接口中 org.springframework.security.core.userdetails.UserDetailspublic boolean isAccountNonExpired()
isAccountNonExpired 在接口中 org.springframework.security.core.userdetails.UserDetailspublic boolean isAccountNonLocked()
isAccountNonLocked 在接口中 org.springframework.security.core.userdetails.UserDetailspublic boolean isCredentialsNonExpired()
isCredentialsNonExpired 在接口中 org.springframework.security.core.userdetails.UserDetailspublic void eraseCredentials()
eraseCredentials 在接口中 org.springframework.security.core.CredentialsContainerpublic String getUserId()
public String getEmployeeId()
public String getAvatar()
public boolean equals(Object o)
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.
Copyright © 2023 Dromara. All rights reserved.