0

WSO2 SCIM 2.0 REST エンドポイント ( https://docs.wso2.com/display/IS560/apidocs/SCIM2-endpoints/index.html#!/operations#UsersEndpoint#getUser ) に従って複数値でユーザーを検索すると属性 (例: 電子メール)。WSO2 ID サーバー (v5.7.0) は空の結果を返します。このようなフィルター文字列 -filter=emails.value co abc@abc.com. http://www.simplecloud.info/specs/draft-scim-api-00.html#query-resourcesによると、構文は良さそうです。

curl -v -k --user : https://localhost:9444/scim2/Users?filter=emails.value+co+richard01

応答: {"totalResults":0,"startIndex":1,"itemsPerPage":0,"schemas":["urn:ietf:params:scim:api:messages:2.0:ListResponse"]

4

1 に答える 1

0

「emails.value」の代わりに、ユーザーの作成時に定義した「email.< type-name >」を入力する必要があります。電子メールは多値属性であるため、タイプを追加してその値を保存できます。ここで、次のようにユーザーを作成していると仮定しましょう。

リクエスト:

curl -v -k --user admin:admin --data '{"schemas":[],"name":{"familyName":"jackson","givenName":"kim"},"userName":"kim","password":"kimwso2","emails":[{"value":"kim_j@wso2.com","type":"work"}]}' --header "Content-Type:application/json" https://localhost:9443/scim2/Users

応答:

{"emails":[{"type":"work","value":"kim_j@wso2.com"}],"meta":{"created":"2019-03-26T15:18:47Z","location":"https://localhost:9443/scim2/Users/c40fe2f2-d9c1-4555-a1d1-e6ff3dde9d41","lastModified":"2019-03-26T15:18:47Z","resourceType":"User"},"schemas":["urn:ietf:params:scim:schemas:core:2.0:User","urn:ietf:params:scim:schemas:extension:enterprise:2.0:User"],"name":{"familyName":"jackson","givenName":"kim"},"id":"c40fe2f2-d9c1-4555-a1d1-e6ff3dde9d41","userName":"kim"}

次に、多値属性の電子メールをフィルタリングしましょう。

リクエスト:

curl -v -k --user admin:admin https://localhost:9443/scim2/Users?filter=emails.work+co+kim

応答:

{"totalResults":1,"startIndex":1,"itemsPerPage":1,"schemas":["urn:ietf:params:scim:api:messages:2.0:ListResponse"],"Resources":[{"emails":[{"type":"work","value":"kim_j@wso2.com"}],"meta":{"created":"2019-03-26T15:18:47Z","location":"https://localhost:9443/scim2/Users/c40fe2f2-d9c1-4555-a1d1-e6ff3dde9d41","lastModified":"2019-03-26T15:18:47Z","resourceType":"User"},"roles":[{"type":"default","value":"Internal/everyone"}],"name":{"givenName":"kim","familyName":"jackson"},"id":"c40fe2f2-d9c1-4555-a1d1-e6ff3dde9d41","userName":"kim"}]}

詳細については、こちらのドキュメントを参照してください。

于 2019-03-26T10:00:57.463 に答える