on 07-05-2004 10:17 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
}
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.