Я могу создать новых пользователей, следуя примеру, найденному здесь:
curl -v -k --user admin@tenant1.com@tenant1.com:admin --data '{"schemas":[],"name":{"familyName":"jackson","givenName":"kim"},"phoneNumbers":[{"type":"mobile","value":"9999"}],"addresses":[{"type":"work","streetAddress":"100 Universal City Plaza","locality":"Hollywood","region":"CA","postalCode":"90068","country":"USA","formatted":"100 Universal City Plaza\nHollywood, CA 90068 USA","primary":true},{"type":"home","streetAddress":"456 Hollywood Blvd","locality":"Hollywood","region":"CA","postalCode":"91608","country":"USA","formatted":"456 Hollywood Blvd\nHollywood, CA 91608 USA"}],"userName":"kim@mail.com","password":"kimwso2","nickName":"abc","title":"Operations Chief","urn:ietf:params:scim:schemas:core:2.0:User:streetAddress":"Miami, florida","emails":[{"primary":true,"value":"kim.jackson@gmail.com","type":"home"},{"value":"kim_j@wso2.com","type":"work"}]}' --header "Content-Type:application/json" https://localhost:9443/t/tenant1.com/scim2/Users
Я хочу добавить поддержку поля departments
для нового пользователя.
В заявках на urn:ietf:params:scim:schemas:extension:enterprise:2.0:User
Я убедился, что отдел претензий существует с отображением на http://wso2.org/claims
скрипт с добавленным отделом
curl -v -k --user admin@tenant1.com@tenant1.com:admin --data '{"schemas":[],"name":{"familyName":"jackson","givenName":"kim"},"phoneNumbers":[{"type":"mobile","value":"9999"}],"addresses":[{"type":"work","streetAddress":"100 Universal City Plaza","locality":"Hollywood","region":"CA","postalCode":"90068","country":"USA","formatted":"100 Universal City Plaza\nHollywood, CA 90068 USA","primary":true},{"type":"home","streetAddress":"456 Hollywood Blvd","locality":"Hollywood","region":"CA","postalCode":"91608","country":"USA","formatted":"456 Hollywood Blvd\nHollywood, CA 91608 USA"}],"department":["Accounting","Marketing and Advertising"],"userName":"kim@mail.com","password":"kimwso2","nickName":"abc","title":"bhhhxxs","urn:ietf:params:scim:schemas:core:2.0:User:streetAddress":"bhhhxxs","emails":[{"primary":true,"value":"kim.jackson@gmail.com","type":"home"},{"value":"kim_j@wso2.com","type":"work"}]}' --header "Content-Type:application/json" https://localhost:9443/t/tenant1.com/scim2/Users
Если я добавлю поле отдела в скрипт, это создаст, но не вернет, когда сделает запрос для этого идентификатора пользователя:
результат curl -v -k --user admin@tenant1.com@tenant1.com:admin https://localhost:9443/t/tenant1.com/scim2/Users/44c7b532-09fe-4530-a199-cf81bff95b3a | jq .
{
"emails": [{
"type": "work",
"value": "kim_j@wso2.com"
},
{
"type": "home",
"value": "kim.jackson@gmail.com"
}
],
"addresses": [{
"type": "work",
"value": "100 Universal City Plaza\nHollywood, CA 90068 USA"
},
{
"type": "home",
"value": "456 Hollywood Blvd\nHollywood, CA 91608 USA"
}
],
"meta": {
"created": "2020-04-08T12:46:30.549Z",
"location": "https://localhost:9443/t/tenant1.com/scim2/Users/44c7b532-09fe-4530-a199-cf81bff95b3a",
"lastModified": "2020-04-08T12:46:30.549Z",
"resourceType": "User"
},
"nickName": "abc",
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:User",
"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User"
],
"roles": [{
"type": "default",
"value": "Internal/everyone"
}],
"name": {
"givenName": "kim",
"familyName": "jackson"
},
"id": "44c7b532-09fe-4530-a199-cf81bff95b3a",
"userName": "kim@mail.com",
"title": "bhhhxxs",
"phoneNumbers": [{
"type": "mobile",
"value": "9999"
}]
}
Я уже прочитал эту документацию без успеха: https://is.docs.wso2.com/en/latest/develop/extensible-scim-user-schemas-with-wso2-identity-server/#extensible-scim-user-schemas-with-wso2-identity-server
https://is.docs.wso2.com/en/latest/develop/extending-scim2-user-schemas/#extending-the-scim-20-api
Моя настройка: wso2is 5.10