Pages

Monday, August 1, 2011

Developing the Custom OIM Client Code Setup

The following steps being used to Customize the OIM functionality as per your requirement.

Initial Setup OIM Customization

Pre-Requisite

Generate the wlfullclient.jar
and set the classpath of the oimclient.jar, spring.jar, commons-logging.jar and generated wlfullclient.jar.

Please follow the link and it will generate the wlfullclient.jar wl full client

Configuring the JAAS Config File

xellerate{
weblogic.security.auth.login.UsernamePasswordLoginModule
required debug=true;
};

Configuring the System Properties

Java Code
System.setProperty("java.security.auth.login.config","JAAS Login Config File")
Command Line
Configuring the System Properties Command Line

java -Djava.security.auth.login.config=<file Name with absolute path> ClassName

Creating the OIM Client Context

Hashtable oimenv= new Hashtable();

oimenv.put(OIMClient.JAVA_NAMING_FACTORY_INITIAL,OIMClient.WLS_CONTEXT_FACTORY);

oimenv.put(OIMClient.JAVA_NAMING_PROVIDER_URL,"t3://<OIM Host Name>:<OIM Port>");
OIMClient client= new OIMClient(oimenv);

Authenticating the User Against OIM

try

{

client.login(<User Name>, <Password with Char Array>);
For Example User Name is xelsysadm and Password is Xelsysadm password.
} catch (LoginException e)

{

e.printStackTrace();

}

No comments:

Post a Comment