[英]create user in Self sign up API in WSO2 version 6.0
Under Self Sign-up API https://is.docs.wso2.com/en/latest/apis/use-the-self-sign-up-rest-apis/#/ we are calling /me POST API for creating the user and we are getting response as 201 created and we are not getting response like this Under Self Sign-up API https://is.docs.wso2.com/en/latest/apis/use-the-self-sign-up-rest-apis/#/ we are calling /me POST API for creating the用户,我们在创建 201 时得到响应,但我们没有得到这样的响应
{
"code": "USR-02007",
"message": "successful user self registration",
"notificationChannel": "EMAIL"
}
what is going wrong here what is causing issue here?这里出了什么问题是什么导致了这里的问题?
When you are using the self-registration REST APIs if you wish to get detailed responses add the following config to the <IS-HOME>/repository/conf/deployment.toml
file and restart the server.当您使用自注册 REST API 时,如果您希望获得详细响应,请将以下配置添加到<IS-HOME>/repository/conf/deployment.toml
文件并重新启动服务器。 (Responses are enabled based on config in order to support backward compatibility). (响应基于配置启用,以支持向后兼容性)。 Anyway, this config should be updated in the REST API docs.无论如何,这个配置应该在 REST API 文档中更新。
[identity_mgt.user_self_registration]
enable_detailed_api_response = true
If the config is not enabled, there is no response body and the response status code would be 201.如果未启用配置,则没有响应正文,响应状态码为 201。
You can add the following configuration to the deployment.toml
to enable more detailed self-registration API responses.您可以将以下配置添加到deployment.toml
以启用更详细的自注册 API 响应。
[identity_mgt.user_self_registration]
enable_detailed_api_response = true
Also, note that the existing registration pages do not support these API responses.另请注意,现有注册页面不支持这些 API 响应。 You need to have a custom UI or improve the existing UI to support the new response model.您需要拥有自定义 UI 或改进现有 UI 以支持新的响应 model。 Before trying this configuration, refer to the following docs, since these improvements were done for a more complex use case.在尝试此配置之前,请参阅以下文档,因为这些改进是针对更复杂的用例完成的。
I have written several articles on this use case.我已经写了几篇关于这个用例的文章。 Following are some of them.以下是其中的一些。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.