FIX: Send the `Accept: application/json` header when fetching user JSON

This commit is contained in:
David Taylor 2019-03-12 11:58:40 +00:00
parent 46da0c9df4
commit 4ccc4d1d5a
1 changed files with 1 additions and 1 deletions

View File

@ -89,7 +89,7 @@ class OAuth2BasicAuthenticator < ::Auth::OAuth2Authenticator
.post_form(URI(user_json_url), 'Authorization' => bearer_token)
.body
else
open(user_json_url, 'Authorization' => bearer_token).read
Excon.get(user_json_url, headers: { 'Authorization' => bearer_token, 'Accept' => 'application/json' }, expects: [200]).body
end
user_json = JSON.parse(user_json_response)