Class LdapAuthenticationProvider
- java.lang.Object
-
- org.craftercms.studio.impl.v2.security.authentication.ldap.LdapAuthenticationProvider
-
- All Implemented Interfaces:
org.springframework.security.authentication.AuthenticationProvider
public class LdapAuthenticationProvider extends Object implements org.springframework.security.authentication.AuthenticationProvider
Implementation ofAuthenticationProvider
to support Studio's LDAP authentication- Since:
- 4.0
- Author:
- joseross
-
-
Field Summary
Fields Modifier and Type Field Description protected AuditServiceInternal
auditServiceInternal
protected GroupDAO
groupDao
protected RetryingDatabaseOperationFacade
retryingDatabaseOperationFacade
protected SiteService
siteService
protected StudioConfiguration
studioConfiguration
protected UserDAO
userDao
protected UserServiceInternal
userServiceInternal
-
Constructor Summary
Constructors Constructor Description LdapAuthenticationProvider(StudioConfiguration studioConfiguration, SiteService siteService, AuditServiceInternal auditServiceInternal, UserServiceInternal userServiceInternal, UserDAO userDao, GroupDAO groupDao, RetryingDatabaseOperationFacade retryingDatabaseOperationFacade)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.security.core.Authentication
authenticate(org.springframework.security.core.Authentication authentication)
void
setEmailLdapAttribute(String emailLdapAttribute)
void
setFirstNameLdapAttribute(String firstNameLdapAttribute)
void
setGroupNameLdapAttribute(String groupNameLdapAttribute)
void
setGroupNameLdapAttributeMatchIndex(int groupNameLdapAttributeMatchIndex)
void
setGroupNameLdapAttributeRegex(String groupNameLdapAttributeRegex)
void
setLastNameLdapAttribute(String lastNameLdapAttribute)
void
setLdapBaseContext(String ldapBaseContext)
void
setLdapPassword(String ldapPassword)
void
setLdapUrl(String ldapUrl)
void
setLdapUsername(String ldapUsername)
void
setUsernameLdapAttribute(String usernameLdapAttribute)
boolean
supports(Class<?> authentication)
protected void
upsertUserGroup(String groupName, String username)
-
-
-
Field Detail
-
studioConfiguration
protected StudioConfiguration studioConfiguration
-
siteService
protected SiteService siteService
-
auditServiceInternal
protected AuditServiceInternal auditServiceInternal
-
userServiceInternal
protected UserServiceInternal userServiceInternal
-
userDao
protected UserDAO userDao
-
groupDao
protected GroupDAO groupDao
-
retryingDatabaseOperationFacade
protected RetryingDatabaseOperationFacade retryingDatabaseOperationFacade
-
-
Constructor Detail
-
LdapAuthenticationProvider
@ConstructorProperties({"studioConfiguration","siteService","auditServiceInternal","userServiceInternal","userDao","groupDao","retryingDatabaseOperationFacade"}) public LdapAuthenticationProvider(StudioConfiguration studioConfiguration, SiteService siteService, AuditServiceInternal auditServiceInternal, UserServiceInternal userServiceInternal, UserDAO userDao, GroupDAO groupDao, RetryingDatabaseOperationFacade retryingDatabaseOperationFacade)
-
-
Method Detail
-
authenticate
public org.springframework.security.core.Authentication authenticate(org.springframework.security.core.Authentication authentication) throws org.springframework.security.core.AuthenticationException
- Specified by:
authenticate
in interfaceorg.springframework.security.authentication.AuthenticationProvider
- Throws:
org.springframework.security.core.AuthenticationException
-
supports
public boolean supports(Class<?> authentication)
- Specified by:
supports
in interfaceorg.springframework.security.authentication.AuthenticationProvider
-
setLdapUrl
public void setLdapUrl(String ldapUrl)
-
setLdapPassword
public void setLdapPassword(String ldapPassword)
-
setLdapUsername
public void setLdapUsername(String ldapUsername)
-
setLdapBaseContext
public void setLdapBaseContext(String ldapBaseContext)
-
setUsernameLdapAttribute
public void setUsernameLdapAttribute(String usernameLdapAttribute)
-
setFirstNameLdapAttribute
public void setFirstNameLdapAttribute(String firstNameLdapAttribute)
-
setLastNameLdapAttribute
public void setLastNameLdapAttribute(String lastNameLdapAttribute)
-
setGroupNameLdapAttribute
public void setGroupNameLdapAttribute(String groupNameLdapAttribute)
-
setGroupNameLdapAttributeRegex
public void setGroupNameLdapAttributeRegex(String groupNameLdapAttributeRegex)
-
setGroupNameLdapAttributeMatchIndex
public void setGroupNameLdapAttributeMatchIndex(int groupNameLdapAttributeMatchIndex)
-
setEmailLdapAttribute
public void setEmailLdapAttribute(String emailLdapAttribute)
-
-