Class LdapService


  • @Service
    public class LdapService
    extends Object
    terrestris GmbH & Co. KG

    Ldap service

    • Constructor Detail

      • LdapService

        public LdapService()
    • Method Detail

      • setLdapTemplate

        public void setLdapTemplate​(org.springframework.ldap.core.LdapTemplate ldapTemplate)
        Set the ldap template property for ldap access.
        Parameters:
        ldapTemplate - the template to set
      • authenticate

        public void authenticate​(String username,
                                 String password)
        Authenticate against ldap.
        Parameters:
        username - the username
        password - the password
      • getGroups

        public List<String> getGroups​(String username,
                                      String property)
        Extract groups from ldap.
        Parameters:
        username - username to search for
        property - the property to extract the groups from
        Returns:
        a list of group names from ldap