Accessing WAM IPolicyClient

Support and Announcements for the Tech Java Web Application Platform (setup, configuration, bugs, feedback).
Locked
tlmaravilla
New Member
Posts: 25
Joined: Tue Feb 01, 2011 5:34 pm
Location: Riverton, UT

Accessing WAM IPolicyClient

#1

Post by tlmaravilla »

Here is how we are currently access the WAM header info:

IPolicyClient ssoClient = WebApplicationPolicyClient.getPolicyClient();

long acctId = Long.parseLong(ssoClient.getPolicyAttribute(PolicyHeader.LDS_ACCT_ID));
user.setLdsAccountId(acctId);

user.setLdsEmailAddr(ssoClient.getPolicyAttribute(PolicyHeader.EMAIL));

user.setLdsPreferredLang(ssoClient.getPolicyAttribute(PolicyHeader.PREFERRED_LANGUAGE));

user.setLdsPreferredNm(ssoClient.getPolicyAttribute(PolicyHeader.PREFERRED_NAME));

....

When we first started with WAM, this was how they instructed us to get the data. Now that WAM has been integrated into the stack, is this still the prescribed way?

This way is working great, until someone internationally logs into our MTM client. Someone like:

Angel Aníbal Cepeda Chicaiza

When we print the WAM data from our logs, the account name is UTF8 encoded:
2011-05-17 12:49:54,765 [FTX15090750] [INFO ] getUser() - LDS Account User Details: User Info: ldsAccountNm:angeluzelyte ldsPreferredNm:=?UTF-8?B?QW5nZWwgQW7DrWJhbCBDZXBlZGEgQ2hpY
2FpemE=?= ldsUnits:/7u176524/5u512028/ ldsAccountId:3512317026385640 ldsPreferredLang:es ldsEmailAddr:elyte_ingenieria@hotmail.com parentUnitNbr:512028 childUnitNbr:176524

It appear that this is a WAM issue, but it may be that our app needs to do something different. (see screen shot)
preferredNmIssue.jpg
preferredNmIssue.jpg (15.68 KiB) Viewed 1041 times
YoungstromMJ
Member
Posts: 101
Joined: Mon Mar 29, 2010 3:11 pm
Location: Utah, USA

#2

Post by YoungstromMJ »

I think you're using "clientlib" currently. clientlib should be fine for continued use.

I know the Stack WAM integration does nothing to handle headers that are UTF-8 encoded like this. My WAM lead will be back in town on Thursday. I'll assign him to work with the WAM team and figure out what we should be doing in such a situation. I'll communicate with you and the client lib maintainer about what we find out. Thanks for identifying this. If this issue needs more urgent action then let me know:

https://tech.lds.org/jira/browse/STACK-3364

Mike
tlmaravilla
New Member
Posts: 25
Joined: Tue Feb 01, 2011 5:34 pm
Location: Riverton, UT

#3

Post by tlmaravilla »

After working with Mark Boyd, turns out that we had an old clientLib. we are now using 1.28 and it looks good
Locked

Return to “Java Web Project Support (Stack)”