java.lang.Object | ||
↳ | org.springframework.security.ldap.authentication.AbstractLdapAuthenticationProvider | |
↳ | org.springframework.security.ldap.authentication.ad.ActiveDirectoryLdapAuthenticationProvider |
Specialized LDAP authentication provider which uses Active Directory configuration conventions.
It will authenticate using the Active Directory
userPrincipalName
(in the form username@domain
). If the username does not already end with the domain name, the
userPrincipalName
will be built by appending the configured domain name to the username supplied in the
authentication request. If no domain name is configured, it is assumed that the username will always contain the
domain name.
The user authorities are obtained from the data contained in the memberOf
attribute.
convertSubErrorCodesToExceptions
property to
true
, the codes will also be used to control the exception raised.
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.security.ldap.authentication.AbstractLdapAuthenticationProvider
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
By default, a failed authentication (LDAP error 49) will result in a
BadCredentialsException . |
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates the user authority list from the values of the
memberOf attribute obtained from the user's
Active Directory entry. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.security.ldap.authentication.AbstractLdapAuthenticationProvider
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
org.springframework.context.MessageSourceAware
| |||||||||||
From interface
org.springframework.security.authentication.AuthenticationProvider
|
domain | the domain name (may be null or empty) |
---|---|
url | an LDAP url (or multiple URLs) |
By default, a failed authentication (LDAP error 49) will result in a BadCredentialsException
.
If this property is set to true
, the exception message from a failed bind attempt will be parsed
for the AD-specific error code and a CredentialsExpiredException
, DisabledException
,
AccountExpiredException
or LockedException
will be thrown for the corresponding codes. All
other codes will result in the default BadCredentialsException
.
convertSubErrorCodesToExceptions | true to raise an exception based on the AD error code.
|
---|
Creates the user authority list from the values of the memberOf
attribute obtained from the user's
Active Directory entry.