在WSO2 Identity Server中使用多个用户配置文件

huangapple go评论54阅读模式
英文:

Multiple user profiles usage in WSO2 Identity Server

问题

使用 Wso2 Identity Server 6.1.0

存在一个功能允许您为用户创建多个用户配置文件。是否有关于如何使用创建的配置文件的文档?是否可以在不同配置文件之间切换上下文?如果可以,如何实现?我对任何帮助和提示表示感激。

在WSO2 Identity Server中使用多个用户配置文件

尝试在文档中查找如何使用它的方法,但没有结果。

链接至文档

英文:

Using Wso2 Identity Server 6.1.0

There is functionality that allows you to create multiple user profiles for a user. Is there any documentation on how to use the created profiles? Is it possible to swap context from one profile to another? If yes how to achieve it? I appreciate for any help and hints.

在WSO2 Identity Server中使用多个用户配置文件

Tried research how to use it in documentation, but without results.
https://is.docs.wso2.com/en/latest/guides/identity-lifecycles/customize-profiles/

答案1

得分: 1

目前,WSO2 IS 具有创建用户的多个配置文件、更新配置文件、检索配置文件等功能(主要支持配置文件管理)。
userstore manager 组件的公共接口已经以一种管理基于所选配置文件的用户的方式编写。

以下图表将显示不同组件如何访问用户数据。

在WSO2 Identity Server中使用多个用户配置文件

尽管支持多个配置文件,但用户的默认配置文件在主要流程中(例如 SCIM、Oauth2)中随处可用,这些流程使用用户数据。

例如:

  • SCIM2 用户列表 API 的服务调用 carbonUM.getUsersClaimValuesWithID 方法,其中配置文件为 null(表示默认配置文件),链接如下:https://github.com/wso2-extensions/identity-inbound-provisioning-scim2/blob/315cdf390cbc249b12424dea28470a77a737b8d6/components/org.wso2.carbon.identity.scim2.common/src/main/java/org/wso2/carbon/identity/scim2/common/impl/SCIMUserManager.java#L4020-L4023
  • 执行的用户存储管理器方法如下链接:https://github.com/wso2/carbon-kernel/blob/35814dfda742fcd82a92833dee0d50de38f148e7/core/org.wso2.carbon.user.core/src/main/java/org/wso2/carbon/user/core/common/AbstractUserStoreManager.java#L16068C47-L16069C32

以下是一个可以根据特定配置文件中定义的声明值检索用户的流程。
getUniqueUserWithClaimValues(claimMap, context, profile) 这个自适应脚本函数在 IS 中得到支持。
参考链接:https://is.docs.wso2.com/en/latest/references/adaptive-authentication-js-api-reference/#:~:text=getUniqueUserWithClaimValues(claimMap%2C%20context%2C%20profile)


此外,如果您有一个特定的用例,需要检索在特定配置文件中定义的用户数据,您可以添加一个 OSGi 服务组件,该组件调用具有相关配置文件的用户存储管理器方法。

英文:

Currently WSO2 IS has the capability to create multiple profiles for a user, update the profiles, retrieve the profile etc (Mainly profile management is supported).
The public interfaces of the userstore manager component have been written in a way to manage the user based on the selected profile.

The following diagram will show how user data is accessed by different components.

在WSO2 Identity Server中使用多个用户配置文件

Even though multiple profile support is available, the DEFAULT profile of the user is used everywhere in the main flows (for example SCIM, Oauth2) which use the user data.

eg:


Here is one flow where you can retrieve the user based on a claim value defined in a specific profile.
getUniqueUserWithClaimValues(claimMap, context, profile) this adaptive script function is supported in IS
Refer: https://is.docs.wso2.com/en/latest/references/adaptive-authentication-js-api-reference/#:~:text=getUniqueUserWithClaimValues(claimMap%2C%20context%2C%20profile)


Further if you have a specific usecase to retrieve a user's data defined in a specific profile, you can add an OSGi service component that invokes the userstore manager method with the relevant profile.

huangapple
  • 本文由 发表于 2023年6月22日 18:36:37
  • 转载请务必保留本文链接:https://go.coder-hub.com/76531030.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定