Authentication Can';wso2中的t过滤器用户与SCIM在一起

Authentication Can';wso2中的t过滤器用户与SCIM在一起,authentication,wso2is,scim,Authentication,Wso2is,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" 及 文件中介绍了该链接: https://docs.wso2.com/display/IS510/SCIM+APIs 但是我不能得到任何信息。 系统通知

我尝试通过以下链接筛选用户或获取用户详细信息:

curl -v -k -X GET --user admin:admin --header "Content-Type:application/json" https://localhost:9443/wso2/scim/Users?filter=userName%20Eq%20”admin"

文件中介绍了该链接:

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]}}
{“Errors”:[{“code”:“400”,“description”:“不支持给定的筛选操作”。}]}

我现在不知道WSO2中需要配置什么是服务器? 这件事你能帮我吗?
谢谢。

我创建了一个用户名thusitha,然后执行了以下查询

curl -v -k -X GET --user admin:admin --header "Content-Type:application/json" https://localhost:9443/wso2/scim/Users\?filter\=userName+Eq+%22thusitha%22
我得到的结果是正确的

{"schemas":["urn:scim:schemas:core:1.0"],"totalResults":1,"Resources":[{"id":"486ebfb2-0b39-45a8-b963-02ae27dbd1dc","userName":"thusitha","meta":{"lastModified":"2016-09-15T11:26:09","created":"2016-09-15T11:26:09"}}]}%  

您可以创建一个新用户并通过更改名称来尝试上述查询吗?

/me endpoint已在IS 5.1.0中中断,这是一个已知的查询。 这已在最新版本5.2.0中修复


其他筛选操作不起作用,因为您使用的是“未经编码的字符。请尝试对该字符进行编码并发送,它应该会起作用。

可以通过curl-link:curl-v-k--user hasinitg:hasinitg获取用户信息吗
{"schemas":["urn:scim:schemas:core:1.0"],"totalResults":1,"Resources":[{"id":"486ebfb2-0b39-45a8-b963-02ae27dbd1dc","userName":"thusitha","meta":{"lastModified":"2016-09-15T11:26:09","created":"2016-09-15T11:26:09"}}]}%