Creating objects

You can use the administration API to create Verify Identity Access objects necessary to complete administrative tasks.

Before you create an object, you must initialize the administration API and establish a security context.

To create an object, use the static creation method associated with the administration object. For example, to create a Verify Identity Access user, you would use the PDUser.createUser() static method. This method results in the Verify Identity Access user being created immediately on the policy server. See the following static method sample, Creating a user.

Creating a user
/*------------------------------------------------------------------
* Create a user, using the PDUser.createUser() static method, and
* assign the user to a specific group. This method sends a
* request to the policy server to create the user.
*------------------------------------------------------------------
*/

// Set up all of the user's attributes
String name = "Stephanie Luser";
String firstName = "Stephanie";
String lastName = "Luser";
String password = "herpassword";
String description = "Descriptive text for Stephanie Luser";
String rgyName = "cn=" + name + "," + rgySuffix;
PDRgyUserName pdRgyUserName =
new PDRgyUserName(rgyName, firstName, lastName);
boolean ssoUser = false;
boolean pwdPolicy = true;
ArrayList groupList = new ArrayList();
groupList.add(groupAdministrativeAssistants);
messages.clear();

PDUser.createUser(mySecurityContext,
name,
pdRgyUserName,
description,
password.toCharArray(),
groupList,
ssoUser,
pwdPolicy,
messages);