简体   繁体   English

在 WSO2 API Manager 中以编程方式添加用户

[英]adding users programmatically in WSO2 API Manager

I am using a combination of WSO2 Identity Server as key server and API Manager for API authorisation against roles.我使用 WSO2 身份服务器作为密钥服务器和 API 管理器的组合来针对角色进行 API 授权。 My requirement is to provide Business users a UI where they can add a user, role and that should reflect in the WSO2.我的要求是为业务用户提供一个 UI,他们可以在其中添加用户、角色,这应该反映在 WSO2 中。 I am using the default user store.我正在使用默认的用户存储。 How can I programmatically do this?我怎样才能以编程方式做到这一点? Is there a REST service which I can use?有我可以使用的 REST 服务吗?

You can do user management functionalities programmatically using the User Management APIs exposed as SOAP services.您可以使用公开为 SOAP 服务的 用户管理 API以编程方式执行用户管理功能。 These APIs allow you to manage user, user roles and claims etc.这些 API 允许您管理用户、用户角色和声明等。

If you cannot use the SOAP services you can use the SCIM API which is a REST endpoint to do operations such as create, delete users.如果您不能使用 SOAP 服务,您可以使用SCIM API (一个 REST 端点)来执行创建、删除用户等操作。 However, this has limited capabilities when compared to the User Management SOAP APIs.但是,与用户管理 SOAP API 相比,这具有有限的功能。

You can use identity server's SCIM REST APIs to add users and roles.您可以使用身份服务器的SCIM REST API添加用户和角色。

Before using this API, you have to enable SCIM in your userstore configurations in user-mgt.xml .在使用此 API 之前,您必须在user-mgt.xml中的user-mgt.xml存储配置中启用 SCIM。

<Property name="SCIMEnabled">true</Property> 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM