Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
+1
person also asked this
people also asked this
Replies
2 replies
Subscribers
7 subscribers
Views
1889 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Administration
Below code is always returning false in my custom plugin. Is there any working A
Bala K
over 10 years ago
Below code is always returning false in my custom plugin. Is there any working API available to check if the username, password supplied is valid? or am I missing something? Please help.
MessageDigest mdg = MessageDigest.getInstance("SHA-512");
byte[] passwordBytes = password.getBytes("UTF-8");
byte[] hashBytes = mdg.digest(passwordBytes);
byte[] hashedPasswordBytes = Base64.encodeBase64(hashBytes);
UserService userService = ServiceLocator.getUserService(sc);
boolean valid = true;
try {
valid = userService.isPasswordValid(user, password);
System.out.println("1.valid="+valid);
valid = userService.isUserPasswordValid(user, hashedPasswordBytes);
System.out.println("2.valid="+valid);
OriginalPostID-181169
OriginalPostID-181169
Discussion posts and replies are publicly visible
Parents
0
Shyam Bommakanti
Certified Lead Developer
over 10 years ago
I agree with Eduardo. Please check my other post related to this. Case 1:
forum.appian.com/.../e-179482
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
Shyam Bommakanti
Certified Lead Developer
over 10 years ago
I agree with Eduardo. Please check my other post related to this. Case 1:
forum.appian.com/.../e-179482
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data