Jersey Client API - authentication

后端 未结 7 2110
不知归路
不知归路 2020-11-30 23:14

I\'m using the Jersey client API to submit SOAP requests to a JAX-WS webservice. By default Jersey is somehow using my Windows Nt credentials for authentication when challen

7条回答
  •  星月不相逢
    2020-12-01 00:04

    Yes for jersey 2.x you can do this to authenticate each request with basic auth (preemptive mode):

     client.register(HttpAuthenticationFeature.basic(userName, password));
     // rest invocation code ..
    

提交回复
热议问题