OIM Change Password API


  1. package com.oimacademy.password;
  2. import oracle.iam.identity.usermgmt.api.UserManager;
  3. import com.oimacademy.connection.Platform;
  4. public class Changepassword{
  5.   @SuppressWarnings("deprecation")
  6. public static void main(String[] args) throws Exception {
  7.        UserManager userManager = (UserManager)Platform.getService(UserManager.class);
  8.       try {
  9.         System.out.println("Changing the password to blank value");
  10.       userManager.changePassword("TUSER4", "Welcome1".toCharArray(), true);
  11.       //  userManager.changePassword("TESTUSER1", pwd.toCharArray(), true);
  12.         System.out.println("Changing the password done...");
  13.       } catch (Exception e) {
  14.         e.printStackTrace();
  15.         throw e;
  16.       }
  17.       System.out.println("Done");    
  18.   }
  19. }

No comments:

Post a Comment