I am using following API "UserPasswordValid" for user password validat

Certified Lead Developer
I am using following API "UserPasswordValid" for user password validation but even i provide correct password its returning me false. I am not sure with the code i am using.
forum.appian.com/.../UserService.html, byte[])

try {

MessageDigest messageDigest = MessageDigest.getInstance("SHA-512");

byte[] passwordBytes = plainTextPassword.getBytes("UTF-8");
byte[] hashBytes = messageDigest.digest(passwordBytes);
byte[] base64EncodedHashedPasswordBytes = Base64.encodeBase64(hashBytes);

UserService us = ServiceLocator.getUserService(sc);
UserProfile userProfileObj=new UserProfile();
userProfileObj=us.authenticate(username,base64EncodedHashedPasswordBytes);

System.out.println("isUserAuthenticated :: "+isUserAuthenticated);


}

Can someone help me with proper code for using this API.

Its working fine for changeUserPassword(Userna...

OriginalPostID-60993

OriginalPostID-60993

  Discussion posts and replies are publicly visible