Package jenkins.security.plugins.ldap
Class LDAPGroupMembershipStrategy
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<LDAPGroupMembershipStrategy>
-
- jenkins.security.plugins.ldap.LDAPGroupMembershipStrategy
-
- All Implemented Interfaces:
Describable<LDAPGroupMembershipStrategy>
- Direct Known Subclasses:
FromGroupSearchLDAPGroupMembershipStrategy
,FromUserRecordLDAPGroupMembershipStrategy
public abstract class LDAPGroupMembershipStrategy extends AbstractDescribableImpl<LDAPGroupMembershipStrategy>
A strategy for determining the groups that a user belongs to.- Since:
- 1.10
-
-
Constructor Summary
Constructors Constructor Description LDAPGroupMembershipStrategy()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description org.springframework.security.ldap.userdetails.LdapAuthoritiesPopulator
getAuthoritiesPopulator()
TheLdapAuthoritiesPopulator
to use if performing a traditional search.abstract Collection<? extends org.springframework.security.core.GrantedAuthority>
getGrantedAuthorities(org.springframework.ldap.core.DirContextOperations userData, String username)
Returns theGrantedAuthority
s that the specified user belongs to.Set<String>
getGroupMembers(String groupDn, LDAPConfiguration conf)
Returns aSet
of all members in the specified group.void
setAuthoritiesPopulator(org.springframework.security.ldap.userdetails.LdapAuthoritiesPopulator authoritiesPopulator)
Override this method if you want to change the configuration of theLdapAuthoritiesPopulator
.-
Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
-
-
-
Method Detail
-
getAuthoritiesPopulator
public org.springframework.security.ldap.userdetails.LdapAuthoritiesPopulator getAuthoritiesPopulator()
TheLdapAuthoritiesPopulator
to use if performing a traditional search.- Returns:
- The
LdapAuthoritiesPopulator
to use if performing a traditional search.
-
setAuthoritiesPopulator
public void setAuthoritiesPopulator(org.springframework.security.ldap.userdetails.LdapAuthoritiesPopulator authoritiesPopulator)
Override this method if you want to change the configuration of theLdapAuthoritiesPopulator
.- Parameters:
authoritiesPopulator
- theLdapAuthoritiesPopulator
to use (and abuse).
-
getGrantedAuthorities
public abstract Collection<? extends org.springframework.security.core.GrantedAuthority> getGrantedAuthorities(org.springframework.ldap.core.DirContextOperations userData, String username)
Returns theGrantedAuthority
s that the specified user belongs to.- Parameters:
userData
- as in- Returns:
- the
GrantedAuthority
s that the specified user belongs to.
-
getGroupMembers
public Set<String> getGroupMembers(String groupDn, LDAPConfiguration conf)
Returns aSet
of all members in the specified group.- Parameters:
groupDn
- the DN of the group whose members will be returned.conf
- theLDAPConfiguration
that controls some search variables.- Returns:
- a set of all members in the specified group, or null if the members could not be found.
- Since:
- 1.18
-
-