public class LdapUserDetailsImpl extends java.lang.Object implements LdapUserDetails
An instance may be created as the result of a search, or when user information is retrieved during authentication.
An instance of this class will be used by the LdapAuthenticationProvider to construct the final user details object that it returns.
| Modifier and Type | Class and Description |
|---|---|
static class |
LdapUserDetailsImpl.Essence
Variation of essence pattern.
|
| Modifier | Constructor and Description |
|---|---|
protected |
LdapUserDetailsImpl() |
| Modifier and Type | Method and Description |
|---|---|
javax.naming.directory.Attributes |
getAttributes()
The attributes for the user's entry in the directory (or a subset of them, depending on what was
retrieved from the directory).
|
GrantedAuthority[] |
getAuthorities()
Returns the authorities granted to the user.
|
java.lang.String |
getDn()
The DN of the entry for this user's account.
|
java.lang.String |
getPassword()
Returns the password used to authenticate the user.
|
java.lang.String |
getUsername()
Returns the username used to authenticate the user.
|
boolean |
isAccountNonExpired()
Indicates whether the user's account has expired.
|
boolean |
isAccountNonLocked()
Indicates whether the user is locked or unlocked.
|
boolean |
isCredentialsNonExpired()
Indicates whether the user's credentials (password) has expired.
|
boolean |
isEnabled()
Indicates whether the user is enabled or disabled.
|
java.lang.String |
toString() |
public javax.naming.directory.Attributes getAttributes()
LdapUserDetailsgetAttributes in interface LdapUserDetailspublic GrantedAuthority[] getAuthorities()
UserDetailsnull.getAuthorities in interface UserDetailsnull)public java.lang.String getDn()
LdapUserDetailsgetDn in interface LdapUserDetailspublic java.lang.String getPassword()
UserDetailsnull.getPassword in interface UserDetailsnull)public java.lang.String getUsername()
UserDetailsnull.getUsername in interface UserDetailsnull)public boolean isAccountNonExpired()
UserDetailsisAccountNonExpired in interface UserDetailstrue if the user's account is valid (ie non-expired), false if no longer valid
(ie expired)public boolean isAccountNonLocked()
UserDetailsisAccountNonLocked in interface UserDetailstrue if the user is not locked, false otherwisepublic boolean isCredentialsNonExpired()
UserDetailsisCredentialsNonExpired in interface UserDetailstrue if the user's credentials are valid (ie non-expired), false if no longer
valid (ie expired)public boolean isEnabled()
UserDetailsisEnabled in interface UserDetailstrue if the user is enabled, false otherwisepublic java.lang.String toString()
toString in class java.lang.Object