On 02/04/2013 10:25, Sergey Beryozkin wrote: > Hi > On 02/04/13 11:18, ZhiYing Yan wrote: >> 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? >> > The signs are that service.pingWithAuthz() produces a different path > than "http://localhost:9080/syncope/cxf/users" - can you ping me > directly please with more details ?
I'd rather go through a public ML - possibly user@ - in order to empower the open development. Agree? -- Francesco Chicchiriccò ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member http://people.apache.org/~ilgrosso/
