IS我試圖篩選用戶或用以下鏈接獲得用戶的細節:不能過濾用戶WSO2與SCIM
curl -v -k -X GET --user admin:admin --header "Content-Type:application/json" https://localhost:9443/wso2/scim/Users?filter=userName%20Eq%20」admin"
和
curl -v -k --user hasinitg:hasinitg https://localhost:9443/wso2/scim/Users/me
的鏈接文檔中介紹:
https://docs.wso2.com/display/IS510/SCIM+APIs
但我無法獲得任何信息。 系統告訴我說:
{"Errors":[{"code":"400","description":"Given filter operation is not supported."}]}
我試圖在Java下面的代碼,但結果是一樣的:
//String url = "https://localhost:9443/wso2/scim/Users?filterEqadmin";
String url = "https://localhost:9443/wso2/scim/Users/me";
BasicCookieStore cookieStore = new BasicCookieStore();
UsernamePasswordCredentials credentials = new UsernamePasswordCredentials("admin", "admin");
SSLContextBuilder builder = new SSLContextBuilder();
builder.loadTrustMaterial(null, new TrustSelfSignedStrategy());
SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(builder.build());
CloseableHttpClient httpclient = HttpClientBuilder.create().setSSLSocketFactory(sslsf)
.setDefaultCookieStore(cookieStore).build();
HttpGet get = new HttpGet(url);
get.addHeader("Accept", "application/json");
get.addHeader("charset", "UTF-8");
get.addHeader("Content-Type", "application/json");
Header header = new BasicScheme().authenticate(credentials, get);
get.addHeader(header);
HttpResponse response = httpclient.execute(get);
System.out.println(response.getStatusLine());
System.out.println("Response Code : " + response);
BufferedReader rd = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));
StringBuffer result = new StringBuffer();
String line = "";
while ((line = rd.readLine()) != null) {
result.append(line);
}
System.out.println(result);
錯誤:
Response Code : HttpResponseProxy{HTTP/1.1 400 Bad Request [Cache-Control: private, Expires: Thu, 01 Jan 1970 08:00:00 ICT, Date: Wed, 14 Sep 2016 10:48:46 GMT, Content-Type: application/json, Content-Length: 84, Connection: close, Server: WSO2 Carbon Server] ResponseEntityProxy{[Content-Type: application/json,Content-Length: 84,Chunked: false]}}
{ 「錯誤」: [{「code」:「400」,「description」:「不支持給定的過濾器操作。」}]}
我現在不是什麼需要在WSO2 IS服務器中進行配置? 請問在這種情況下你能幫我嗎? 謝謝。
Y可以得到由捲曲鏈路用戶信息:。 捲曲-v -k --user hasinitg:hasinitg https:// localhost:9443/wso2/scim/Users/me – user2659694
是可能的 https://docs.wso2.com/display/IS510/SCIM+APIs – Ishara
這在5.1.0中被破壞https: //wso2.org/jira/browse/IDENTITY-4329 –