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 13:34:00 UTC

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

neng xu created HTTPCLIENT-2171:
-----------------------------------

             Summary: 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


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