Create an object or val that is a subclass of the FactoryMaker to generate factory for a particular class as well as define session and request specific vendors and use doWith to define the vendor just for the scope of the call.
Attempts to authenticate the given DN against the configured LDAP provider.
The configuration to use for connecting to the provider.
The configuration to use for connecting to the provider. It should be set via the configure methods
Configure from the given Map[String,String]
Configure from the given input stream.
Configure from the given input stream. The stream is expected to be in a format parseable by java.util.Properties
Configure from the given file.
Configure from the given file. The file is expected to be in a format parseable by java.util.Properties
Configure straight from the Props object.
Configure straight from the Props object. This allows you to use Lift's run modes for different LDAP configuration.
The default SearchControls to use: search the base DN with a sub-tree scope, and return the "cn" attribute.
This method attempts to fetch the cached InitialLdapContext for the current thread.
This method attempts to fetch the cached InitialLdapContext for the current thread. If there isn't a current context, open a new one. If a test DN is configured, the connection (cached or new) will be validated by performing a lookup on the test DN.
Obtains a (possibly cached) InitialContext instance based on the currently set parameters.
Perform the injection for the given type.
Perform the injection for the given type. You can call: inject[Date] or inject[List[Map[String, PaymentThing]]]. The appropriate Manifest will be
This controls the type of authentication to use.
This controls the base DN used for searcheds
This controls the factory used to obtain an InitialContext
This controls the password used to bind for searches (not authentication)
This controls the URL used to connect to the LDAP server
This controls the username used to bind for searches (not authentication)
This method does the actual work of setting up the environment and constructing the InitialLdapContext.
This method does the actual work of setting up the environment and constructing the InitialLdapContext.
This method checks the configuration and sets defaults for any properties that are required.
This method checks the configuration and sets defaults for any properties that are required. It also processes any of the optional configuration propertes related to context testing and retries.
This method is intended to be called during update of the default configuration, not during granular override of the config.
Register a function that will inject for the given Manifest
Register a function that will inject for the given Manifest
This sets the interval between connection attempts on the InitialContext.
This sets the interval between connection attempts on the InitialContext. The default is 5 seconds
This sets the maximum number of connection attempts before giving up.
This sets the maximum number of connection attempts before giving up. The default is 6
Searches the base DN for entities matching the given filter.
This sets the Directory SearchControls instance that is used to refine searches on the provider.
This can be set to test the InitialContext on each LDAP operation.
This can be set to test the InitialContext on each LDAP operation. It should be set to a search DN.
This class provides functionality to allow us to search and bind (authenticate) a username from a ldap server.
To configure the LDAP Vendor parameters, use one of the configure methods to provide a Map of string parameters.
The primary parameters (with defaults) are:
-
Optionally, you can set the following parameters to control context testing and reconnect attempts:
In addition to configuration via a Map or Properties file, fine-grained control over behaviors can be specified via Inject values corresponding to each of the properties.
To use LDAPVendor, you can simply create an object extending it and configure: