diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2018-07-20 18:17:43 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2018-07-24 10:11:49 +0200 |
commit | 6f5ef24f068a86d0f61ce39f674462128c1743d1 (patch) | |
tree | c871779098dfb52db39b8b149537dc6180fa046b /lib | |
parent | df57b439f4cfd594bde29055e7258607056985dc (diff) |
auth: pick Bearer authentication whenever a token is available
So far, the code tries to pick an authentication method only if
user/password credentials are available, which is not the case for
Bearer authentictation...
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Closes #2754
Diffstat (limited to 'lib')
-rw-r--r-- | lib/http.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/http.c b/lib/http.c index 34565590f..bc1f85850 100644 --- a/lib/http.c +++ b/lib/http.c @@ -520,7 +520,7 @@ CURLcode Curl_http_auth_act(struct connectdata *conn) if(data->state.authproblem) return data->set.http_fail_on_error?CURLE_HTTP_RETURNED_ERROR:CURLE_OK; - if(conn->bits.user_passwd && + if((conn->bits.user_passwd || conn->oauth_bearer) && ((data->req.httpcode == 401) || (conn->bits.authneg && data->req.httpcode < 300))) { pickhost = pickoneauth(&data->state.authhost, authmask); |