Changing password in external AD from ADF application
Hi,
we have a requirement to change a users password from within an ADF application.
We were able to get this to work using the following code against the JDeveloper integrated LDAP just fine by using the following code:
JpsContextFactory fact = JpsContextFactory.getContextFactory();
JpsContext con = fact.getContext();
IdentityStoreService storeService = con.getServiceInstance(IdentityStoreService.class);
IdentityStore is = storeService.getIdmStore();
UserManager manager = is.getUserManager();
System.out.println("updatable? = "manager.isModifyUserSupported()); //THIS RETURNS TRUE+
User user = is.searchUser("jasonr");
System.out.println("users display name = "user.getDisplayName());+
user.getUserProfile().setPassword("old".toCharArray(), "new".toCharArray());
When I snap in an Authentication Provider for Active Directory, this code falls over on searching for a user within AD.
To fix this, I set the virtualize = true parameter within the jps-config.xml.
Now I get a strange error when attempting to change the users password:
javax.faces.el.EvaluationException: oracle.security.idm.OperationFailureException: oracle.ods.virtualization.service.VirtualizationException: Virtualization Session closed
at oracle.security.idm.providers.libovd.util.LibOVDRealm.throwException(LibOVDRealm.java:675)
at oracle.security.idm.providers.libovd.util.LDAPUser.setProperties(LDAPUser.java:142)
at oracle.security.idm.providers.libovd.LibOVDUser.setProperties(LibOVDUser.java:224)
at oracle.security.idm.providers.libovd.LibOVDUser.setPassword(LibOVDUser.java:575)
at oracle.security.idm.providers.libovd.LibOVDUser.setPassword(LibOVDUser.java:531)
Is there a solution to this problem?
Regards
Jason