Skip to Content
avatar image
Former Member

Problems using "IUserMappingService" - cannot access password

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Jul 07, 2004 at 07:03 AM

    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?

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

      }

  • avatar image
    Former Member
    Jul 07, 2004 at 01:33 PM

    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

    Add comment
    10|10000 characters needed characters exceeded