jersey icon indicating copy to clipboard operation
jersey copied to clipboard

Set default AuthSchemeRegistry with Jersey Client

Open jerseyrobot opened this issue 7 years ago • 4 comments

Hi, ApacheHttpComponents support configuring AuthSchemeRegistry. However Jersey doesn't seem to provide an option to set default authScheme Registry. Is there some way I can configure the same? Also does Jersey provide native support to Kerberos authentication?

Thanks in advance.

jerseyrobot avatar Sep 20 '17 08:09 jerseyrobot

  • Issue Imported From: https://github.com/jersey/jersey/issues/3676
  • Original Issue Raised By:@mutkur
  • Original Issue Assigned To: Unassigned

jerseyrobot avatar Apr 20 '18 08:04 jerseyrobot

@fabriziocucci Commented I guess this is more a question for the mailing list, but have you tried already something like this?

jerseyrobot avatar Sep 21 '17 08:09 jerseyrobot

@mutkur Commented Yes. This is what I have done to get around it. Can this be considered as an enhancement request?

jerseyrobot avatar Sep 21 '17 16:09 jerseyrobot

I used this to use NTLM auth by default with Jersey v2 and Apache HTTP client with jersey-apache-connector:

RequestConfig requestConfig = RequestConfig.custom().setTargetPreferredAuthSchemes(Arrays.asList(AuthSchemes.NTLM)).build();

ClientConfig clientConfig = new ClientConfig();
clientConfig.property(ApacheClientProperties.REQUEST_CONFIG, requestConfig);

Client client = ClientBuilder.newClient(clientConfig);

bmaupin avatar Apr 04 '24 15:04 bmaupin