3.0 Configuring the User Directory

The SchlapiConfig class allows the Java applications to integrate with the directory that stores the SecureLogin single sign-on data. A user with necessary right can access the directory using the UserAPI with SchlAPIConfig. The following is an example of credentials provisioning.

Map creds = new HashMap(); creds.put("username", "Joe User"); creds.put("password", "my secret"); SchlapiConfig config = new SchlapiConfig() { ... }; // API user's will need to provide details of the directory configuration UserAPI api = new UserAPI(config); api.attach("cn=juser,ou=engineering,o=corporation"); api.provisionAccount("some account", creds, null); api.close();

Methods Details

The following table explains the methods and modifiers to use with SchlAPIConfig.

Modifier and Type

Method and Description

string

getCertificateFile() If you are using SSL you have two options for providing the server certificate. You can either import it into Java's keystore as a trusted certificate or you can specify the certificate filename. It requires JRE v1.4 or above. Specify null if you do not wish to provide a certificate.

string []

getContexts()

Contexts to search for users if the full LDAP DN is not provided.

string

getLicense() This is the license key provided by Protocom.

string

getPassword() Password for the user specified in getUser(), this password is used to connect to the directory.

int

getPort() Port number to connect to the directory. This is usually 389 (LDAP) or 636 (LDAP/SSL).

string

getServer()

The IP address or DNS name of the directory server that includes single sign-on data.

string

getUser() Username to connect to the directory. UserAPI requires a user with required rights to the SecureLogin single sign-on attributes.

boolean

useSSL() Indicates to use SSL for connection.