@Component(value="cuba_LdapLoginProvider") public class LdapLoginProvider extends java.lang.Object implements LoginProvider, org.springframework.core.Ordered
WebLdapConfig
Modifier and Type | Field and Description |
---|---|
protected AuthenticationService |
authenticationService |
protected org.springframework.ldap.core.support.LdapContextSource |
ldapContextSource |
protected org.springframework.ldap.core.LdapTemplate |
ldapTemplate |
protected Messages |
messages |
protected WebAuthConfig |
webAuthConfig |
protected WebLdapConfig |
webLdapConfig |
HIGHEST_PLATFORM_PRECEDENCE, LOWEST_PLATFORM_PRECEDENCE
Constructor and Description |
---|
LdapLoginProvider() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
authenticateInLdap(LoginPasswordCredentials credentials) |
protected java.lang.String |
buildPersonFilter(java.lang.String login) |
protected void |
checkRequiredConfigProperties(WebLdapConfig webLdapConfig) |
int |
getOrder() |
protected void |
init() |
AuthenticationDetails |
login(Credentials credentials)
Authenticates a user and provides authentication details.
|
protected AuthenticationDetails |
loginMiddleware(Credentials credentials) |
boolean |
supports(java.lang.Class<?> credentialsClass)
Checks if this provider supports passed credentials class or not.
|
@Inject protected AuthenticationService authenticationService
@Inject protected WebLdapConfig webLdapConfig
@Inject protected WebAuthConfig webAuthConfig
@Inject protected Messages messages
protected org.springframework.ldap.core.support.LdapContextSource ldapContextSource
protected org.springframework.ldap.core.LdapTemplate ldapTemplate
@Nullable public AuthenticationDetails login(Credentials credentials) throws LoginException
LoginProvider
login
in interface LoginProvider
credentials
- credentialsLoginException
- if authentication failsprotected AuthenticationDetails loginMiddleware(Credentials credentials) throws LoginException
LoginException
protected boolean authenticateInLdap(LoginPasswordCredentials credentials) throws LoginException
LoginException
public boolean supports(java.lang.Class<?> credentialsClass)
LoginProvider
supports
in interface LoginProvider
credentialsClass
- credentials classCredentials
object.public int getOrder()
getOrder
in interface org.springframework.core.Ordered
protected java.lang.String buildPersonFilter(java.lang.String login)
protected void checkRequiredConfigProperties(WebLdapConfig webLdapConfig)
@PostConstruct protected void init()