IBM MobileFirst Platform Foundation 6.3: Can we ed

2019-08-05 17:04发布

With the help of the following API calls,

1. WL.Server.setActiveUser
2. WL.Server.getCurrentUserIdentity

We can create user session and get the user identity properties respectively.

I have a scenario where I want to update the properties[custom attributes] in the user identity object when the session is active.

I couldn't find an API which can do this task.

Is there any way/work-around available.

1条回答
Summer. ? 凉城
2楼-- · 2019-08-05 17:37

In general activated userIdentity is immutable. Try this, it might work

var userIdentity = WL.Server.getActiveUser("realm");
userIdentity[propName] = newValue;
WL.Server.setActiveUser("realm", null);
WL.Server.setActiveUser("realm", userIdentity); 
查看更多
登录 后发表回答