Description: Set derby.authentication.provider to the full name of a class that implements the public interface org.apache.derby.authentication.UserAuthenticator.
Keywords: User authorization, providing your own

# User-defined class

Set derby.authentication.provider to the full name of a class that implements the public interface org.apache.derby.authentication.UserAuthenticator.

By writing your own class that fulfills some minimal requirements, you can hook Derby up to an external authentication service other than LDAP. To do so, specify an external authentication service by setting the property `derby.authentication.provider` to a class name that you want Derby to load at startup.

The class that provides the external authentication service must implement the public interface org.apache.derby.authentication.UserAuthenticator and throw exceptions of the type java.sql.SQLException where appropriate.

Using a user-defined class makes Derby adaptable to various naming and directory services.

- Example of setting a user-defined class
  A very simple example of a class that implements the org.apache.derby.authentication.UserAuthenticator interface.

Parent topic: External directory service
Related concepts
Defining users
LDAP directory service
JNDI-specific properties for external directory services