Hello,
I am a developer of Talend.
I need to write a checker which get if the syncope username and password used 
are right or not.
But I don't know how?

After I open the syncope , I can access http://localhost:9080/syncope-console, 
and then input user id and password, then I can see the content.
And  after access http://localhost:9080/syncope/cxf/users in browser and input 
username/password, it shows the correct users.
I mean the syncope service has been started correct. And the username/password 
is also correct.

I tried the following code but always get 404.
  PingService service = 
JAXRSClientFactory.create("http://localhost:9080/syncope/cxf";, 
PingService.class);
                
WebClient.getConfig(service).getHttpConduit().getClient().setReceiveTimeout(300000);
                String guestAuthzHeaderForArtifactTransfer = "Basic " + 
Base64Utility.encode((username + ":" + password).getBytes());

                if (guestAuthzHeaderForArtifactTransfer != null) {
                    WebClient.client(service).header("Authorization", 
guestAuthzHeaderForArtifactTransfer);
                }
                service.pingWithAuthz(); // get 404 here.

Is the url http://localhost:9080/syncope/cxf wrong, or the way use webclient 
wrong?
Could you tell me how to check the username/password with java code?

Thanks and Regards!

--
Jill Yan
ESB team web developer
Skype: yanzhiying.talendbj
Email: [email protected]<mailto:[email protected]>

Reply via email to