Class LdapService


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

    Ldap service

    • Constructor Summary

      Constructors 
      Constructor Description
      LdapService()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void authenticate​(java.lang.String username, java.lang.String password)
      Authenticate against ldap.
      java.util.List<java.lang.String> getGroups​(java.lang.String username, java.lang.String property)
      Extract groups from ldap.
      void setLdapTemplate​(org.springframework.ldap.core.LdapTemplate ldapTemplate)
      Set the ldap template property for ldap access.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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​(java.lang.String username,
                                 java.lang.String password)
        Authenticate against ldap.
        Parameters:
        username - the username
        password - the password
      • getGroups

        public java.util.List<java.lang.String> getGroups​(java.lang.String username,
                                                          java.lang.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