Accessing WAM IPolicyClient

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

Accessing WAM IPolicyClient

Postby tlmaravilla » Tue May 17, 2011 1:44 pm

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 229 times

YoungstromMJ
Member
Posts: 100
Joined: Mon Mar 29, 2010 2:11 pm
Location: Utah, USA

Postby YoungstromMJ » Tue May 17, 2011 3:59 pm

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

Postby tlmaravilla » Wed May 18, 2011 1:34 pm

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


Return to “Java Web Project Support (Stack)”

Who is online

Users browsing this forum: No registered users and 1 guest