IBM MobileFirst Platform Foundation 6.3:我们可以编辑用户标识对象的自定义属性[MobileFirst Session] [英] IBM MobileFirst Platform Foundation 6.3: Can we edit the custom attributes of User Identity Object [MobileFirst Session]

查看:73
本文介绍了IBM MobileFirst Platform Foundation 6.3:我们可以编辑用户标识对象的自定义属性[MobileFirst Session]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在以下API调用的帮助下,

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.

我找不到可以执行此任务的API。

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

有没有办法/解决方法可用。

Is there any way/work-around available.

推荐答案

通常,激活的userIdentity是不可变的。试试这个,它可能有效

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); 

这篇关于IBM MobileFirst Platform Foundation 6.3:我们可以编辑用户标识对象的自定义属性[MobileFirst Session]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆