cancel
Showing results for 
Search instead for 
Did you mean: 

Problems using "IUserMappingService" - cannot access password

Former Member
0 Kudos

Hello

I´m trying to establish a connection between an EP 6 portal and a webservice.

I´m using the "UserMappingService" to store UserId and Password of the webservice.

I can access the UserID, but when I try to access the Password the appropriate function only returns "******" instead of the plain password.

this is the code I´m using:

IUserMappingService umap = (IUserMappingService) PortalRuntime.getRuntimeResources().getService(IUserMappingService.KEY);

IUserMappingData umData = umap.getMappingData ("mySystem", request.getUser());

HashMap umInfoOfUser = new HashMap ();

try {

umData.enrich (umInfoOfUser);

} catch (NoLogonDataAvailableException e) {

e.printStackTrace();

}

String mappedUser = (String) umInfoOfUser.get ("user");

String mappedPassword (String) umInfoOfUser.get ("mappedpassword");

mappedPassword returns "*****"

Can anyone tell me how to get the real password ?

Alexander

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

I believe there is a bug in SP2 where the User mapping UI that puts asterisks in the password field to mask it. If you do not change the password and then save the mapping information you get **** stored for the password. Try to change the password in the UI and then save it. If the problem persists, then enter an OSS message. I spoke with the User Mgt developers about this a few weeks ago and they are aware of the issue.

Best regards,

Will

Former Member
0 Kudos

Reentering the password worked.

Thank you very much

Alexander

Former Member
0 Kudos

Haven't tried anything similar but would have belived this is the correct method.

Have you checked if there are other fields in the HashMap?

Former Member
0 Kudos

This retrieves mapped UserID and Password in EP6.

try {

IUser me = request.getUser();

Map mapattr = new HashMap();

IUserMappingData map =

UMFactory.getUserMapping().getUserMappingData("systemName",me,null);

map.enrich(mapattr);

userID=((String) mapattr.get(USER_NAME_ATRRIBUTE));

mappedPassword=((String) mapattr.get(MAPPED_PASSWORD_ATTRIBUTE));

}

catch(NoLogonDataAvailableException nldae){// Do what ever you want to do

}

catch (Exception e) {

//Handle Exception

}