Open a client connection to OIM Server
Open a connection to OIM server at hostname host, port port, with credentials username, password from a client Java application.
System.setProperty("java.security.auth.login.config", "file:config/authwl.conf"); Hashtable<String, String> env = new Hashtable<String, String>(); env.put(OIMClient.JAVA_NAMING_FACTORY_INITIAL, "weblogic.jndi.WLInitialContextFactory"); env.put(OIMClient.JAVA_NAMING_PROVIDER_URL, "t3://" + hostname + ":" + port); OIMClient oimClient = new OIMClient(env); oimClient.login(username, password.toCharArray());
The contents of the referenced config/authwl.conf file:
xellerate{
weblogic.security.auth.login.UsernamePasswordLoginModule
required debug=true;
};
See also
page revision: 7, last edited: 26 Jun 2012 17:25