code: def ldap_plugin(self):
          
          name = self._ask_with_default("Authentication method name (will be displayed on the login page)", "LDAP")
          prefix = self._ask_with_default("Prefix to append to the username before db storage. Usefull when you have more than one auth method with "
                                          "common usernames.", "")
          ldap_host = self._ask_with_default("LDAP Host", "ldap.your.domain.com")
  
          encryption = 'none'
          while True:
              encryption = self._ask_with_default("Encryption (either 'ssl', 'tls', or 'none')", 'none')
              if encryption not in ['none', 'ssl', 'tls']:
                  self._display_error("Invalid value")
              else:
                  break
  
          base_dn = self._ask_with_default("Base DN", "ou=people,c=com")
          request = self._ask_with_default("Request to find a user. '{}' will be replaced by the username", "uid={}")
          require_cert = self._ask_boolean("Require certificate validation?", encryption is not None)
  
          return {
              "plugin_module": "inginious.frontend.plugins.auth.ldap_auth",
              "host": ldap_host,
              "encryption": encryption,
              "base_dn": base_dn,
              "request": request,
              "prefix": prefix,
              "name": name,
              "require_cert": require_cert
          }
docs: Configures the LDAP plugin