Skip to Content
avatar image
Former Member

How to validate user's password in NWDS 7.3

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";
}

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers