I have implemented Custom Authenticator and Login Module in IBM Worklight 6.0. The authentication mechanism works fine.
I had set custom attributes in User identity object like roles, email, etc..
In Login module,
public UserIdentity createIdentity(String realm) {
Map<String, Object> customAttributes= new HashMap<String, Object>();
customAttributes.put("userName", username);
customAttributes.put("mail", customAttrValue); //customAttrValue - this has the email id
UserIdentity uiObj=new UserIdentity("CustomRealm", username, username, null, customAttributes, password);
return uiObj;
}
Now I am unable to retrieve the attribute values using the below api call. WL.Client.getUserInfo("CustomRealm", "mail");