Ich habe versucht, Benutzer zu filtern oder Benutzer Detail mit dem folgenden Link zu erhalten:Kann nicht filtern Benutzer in WSO2 IS mit 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"
und
curl -v -k --user hasinitg:hasinitg https://localhost:9443/wso2/scim/Users/me
Der Link wird eingeführt in dem Dokument:
https://docs.wso2.com/display/IS510/SCIM+APIs
Aber ich kann keine Informationen bekommen. Das System informierte mich, dass:
{"Errors":[{"code":"400","description":"Given filter operation is not supported."}]}
ich mit dem folgenden Code in Java versucht, aber das Ergebnis ist das gleiche:
//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);
Fehler:
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]}}
{ "Fehler": [{"code": "400", "description": "Die angegebene Filteroperation wird nicht unterstützt."}]}
Ich weiß jetzt nicht was muss im WSO2 IS Server konfiguriert werden? Könnte mir bitte in diesem Fall helfen? Danke.
Kann y Benutzer Informationen durch curl Link bekommen:.. curl -v -k --user hasinitg: hasinitg https: // localhost: 9443/wso2/scim/Benutzer/ich – user2659694
Ja ist möglich https://docs.wso2.com/display/IS510/SCIM+APIs – Ishara
Dies wurde in 5.1.0 https gebrochen: //wso2.org/jira/browse/IDENTITY-4329 –