You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "neng xu (Jira)" <ji...@apache.org> on 2021/08/18 17:02:00 UTC

[jira] [Issue Comment Deleted] (HTTPCLIENT-2171) Basic Authentication Failed With UserId containing "\"

     [ https://issues.apache.org/jira/browse/HTTPCLIENT-2171?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

neng xu updated HTTPCLIENT-2171:
--------------------------------
    Comment: was deleted

(was: Test with "\")

> Basic Authentication Failed With UserId containing "\"
> ------------------------------------------------------
>
>                 Key: HTTPCLIENT-2171
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-2171
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient (classic)
>    Affects Versions: 5.1
>            Reporter: neng xu
>            Priority: Major
>
> When upgrade HttpClient from 4.5.x version to 5.1, a problem happened when using UserId =ADPTestSandbox\Phoenix.API. 
> All other userIds which do not have "\" work with HttpClient5.1.
> UserId which has "\" works with HttpClient 3.x  and 4.5.x. but not HttpClient 5.1
> Test code:
> ..........
> BasicCredentialsProvider provider = new BasicCredentialsProvider();
> UsernamePasswordCredentials credentials = new UsernamePasswordCredentials(usrId,password.toCharArray());
> provider.setCredentials(new AuthScope(null, -1), credentials);
> CloseableHttpClient httpclient = HttpClients.custom().setDefaultCredentialsProvider(provider).build();
> .............



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org