This is quite simple.
Most likely, you will be having a similar configuration to this defined in your authwl.conf
-file:
xellerate{
weblogic.security.auth.login.UsernamePasswordLoginModule
required debug=true;
};
Additionally, you will also be needed to define a system property like this:
System.setProperty("java.security.auth.login.config", getPathToConfigurationFile(oimServer));
The point behind this file is that it actually holds the JAAS configuration in regards to connections made to OIM (allowing your client to speak as intended with OIM).
Instead of defining the file and a system parameter, just specify the following code instead:
import weblogic.security.auth.login.UsernamePasswordLoginModule;
import javax.security.auth.login.AppConfigurationEntry;
import javax.security.auth.login.Configuration;
...
...
Configuration.setConfiguration(new Configuration() {
@Override
public AppConfigurationEntry[] getAppConfigurationEntry(String name) {
Preconditions.checkArgument("xellerate".equals(name));
return new AppConfigurationEntry[]{new AppConfigurationEntry(UsernamePasswordLoginModule.class.getName(), AppConfigurationEntry.LoginModuleControlFlag.REQUIRED, Collections.singletonMap("debug", "true"))};
}
});
...
...
This is the same as having a file with the configuration.
Thank me later :-)