Class LdapUserDetailsImpl
java.lang.Object
org.springframework.security.ldap.userdetails.LdapUserDetailsImpl
- All Implemented Interfaces:
Serializable,org.springframework.security.core.CredentialsContainer,org.springframework.security.core.userdetails.UserDetails,PasswordPolicyData,LdapUserDetails
- Direct Known Subclasses:
Person
A UserDetails implementation which is used internally by the Ldap services. It also
contains the user's distinguished name and a set of attributes that have been retrieved
from the Ldap server.
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.
The equals and hashcode methods are implemented using the Dn
property and do not consider additional state, so it is not possible two store two
instances with the same DN in the same set, or use them as keys in a map.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classVariation of essence pattern. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidCollection<org.springframework.security.core.GrantedAuthority>getDn()The DN of the entry for this user's account.intintinthashCode()booleanbooleanbooleanbooleantoString()
-
Constructor Details
-
LdapUserDetailsImpl
protected LdapUserDetailsImpl()
-
-
Method Details
-
getAuthorities
- Specified by:
getAuthoritiesin interfaceorg.springframework.security.core.userdetails.UserDetails
-
getDn
Description copied from interface:LdapUserDetailsThe DN of the entry for this user's account.- Specified by:
getDnin interfaceLdapUserDetails- Returns:
- the user's DN
-
getPassword
- Specified by:
getPasswordin interfaceorg.springframework.security.core.userdetails.UserDetails
-
getUsername
- Specified by:
getUsernamein interfaceorg.springframework.security.core.userdetails.UserDetails
-
isAccountNonExpired
public boolean isAccountNonExpired()- Specified by:
isAccountNonExpiredin interfaceorg.springframework.security.core.userdetails.UserDetails
-
isAccountNonLocked
public boolean isAccountNonLocked()- Specified by:
isAccountNonLockedin interfaceorg.springframework.security.core.userdetails.UserDetails
-
isCredentialsNonExpired
public boolean isCredentialsNonExpired()- Specified by:
isCredentialsNonExpiredin interfaceorg.springframework.security.core.userdetails.UserDetails
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabledin interfaceorg.springframework.security.core.userdetails.UserDetails
-
eraseCredentials
public void eraseCredentials()- Specified by:
eraseCredentialsin interfaceorg.springframework.security.core.CredentialsContainer
-
getTimeBeforeExpiration
public int getTimeBeforeExpiration()- Specified by:
getTimeBeforeExpirationin interfacePasswordPolicyData
-
getGraceLoginsRemaining
public int getGraceLoginsRemaining()- Specified by:
getGraceLoginsRemainingin interfacePasswordPolicyData
-
equals
-
hashCode
public int hashCode() -
toString
-