Skip to Content
0

How to validate user's password in NWDS 7.3

Mar 21 at 05:52 AM

32

avatar image

Hello experts,

We are using NSDS7.3. We try to validate user's password in NWDS 7.3 with the below code, but got the error "[EXCEPTION]
java.lang.ClassCastException: Cannot cast class com.sap.security.core.imp.UserWrapper to interface com.sap.security.api.IUserAccount". How to fix that?

================================================

IUserFactory iuf = UMFactory.getUserFactory();
IUserAccount iua = null;
try {
iua = (IUserAccount) iuf.getUserByLogonID("USERA");
} catch (UMException e) {
res = e.toString();
}
if (iua.checkPassword("123456")){
res = "Hello, USERA";
} else {
res = "Hello, SAP";
}

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers