gpt4 book ai didi

wso2 - 使用 scim2 apis 在 wso2 中添加用户时如何添加角色/组是 5.9.0?

转载 作者:行者123 更新时间:2023-12-01 15:38:01 24 4
gpt4 key购买 nike

我正在尝试使用此 api-https://localhost:9443/scim2/Users 创建用户

如何将此用户添加到创建的组?你能提供有效载荷吗

我的有效载荷-

{
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
"name": {
"familyName": "jackson",
"givenName": "kim"
},
"userName": "test2",
"password": "abc123",
"postalcode":"56789",
"profileUrl":"gmail.com",
"emails": [
{
"type":"default",
"value":"a@gmail.com"
},
{
"value": "kim.jackson@gmail.com",
"type": "home"
},
{
"value": "kim_j@wso2.com",
"type": "work"
}
]
}

最佳答案

以下将使用“补丁”操作将具有 SCIM id“81cbba1b-c259-485d-8ba4-79afb03e5bd1”的用户“Kris”添加到组中。

{
"schemas":[
"urn:ietf:params:scim:api:messages:2.0:PatchOp"
],
"Operations":[
{
"op":"add",
"value":{
"members":[
{
"display":"Kris",
"$ref":"https://localhost:9443/scim2/Users/81cbba1b-c259-485d-8ba4-79afb03e5bd1",
"value":"81cbba1b-c259-485d-8ba4-79afb03e5bd1"
}
]
}
}
]
}

Bellow 是完整的 CURL 命令。您可以随时引用 [1] 获取 API 信息。
curl -v -k --user admin:admin -X PATCH -d '{"schemas":["urn:ietf:params:scim:api:messages:2.0:PatchOp"],"Operations":[{"op":"add","value":{"members":[{"display": "Kris","$ref":"https://localhost:9443/scim2/Users/81cbba1b-c259-485d-8ba4-79afb03e5bd1","value": "81cbba1b-c259-485d-8ba4-79afb03e5bd1"}]}}]}' --header "Content-Type:application/json" https://localhost:9443/scim2/Groups/a43fe003-d90d-43ca-ae38-d2332ecc0f36

[1] https://docs.wso2.com/display/IS570/apidocs/SCIM2-endpoints/#!/operations#GroupsEndpoint#patchGroup

关于wso2 - 使用 scim2 apis 在 wso2 中添加用户时如何添加角色/组是 5.9.0?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59247571/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com