jersey
jersey copied to clipboard
Set default AuthSchemeRegistry with Jersey Client
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.
- Issue Imported From: https://github.com/jersey/jersey/issues/3676
- Original Issue Raised By:@mutkur
- Original Issue Assigned To: Unassigned
@fabriziocucci Commented I guess this is more a question for the mailing list, but have you tried already something like this?
@mutkur Commented Yes. This is what I have done to get around it. Can this be considered as an enhancement request?
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);