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)
Accessing WAM IPolicyClient
-
- New Member
- Posts: 25
- Joined: Tue Feb 01, 2011 5:34 pm
- Location: Riverton, UT
-
- Member
- Posts: 101
- Joined: Mon Mar 29, 2010 3:11 pm
- Location: Utah, USA
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
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
-
- New Member
- Posts: 25
- Joined: Tue Feb 01, 2011 5:34 pm
- Location: Riverton, UT