FIX: Send the `Accept: application/json` header when fetching user JSON
This commit is contained in:
parent
46da0c9df4
commit
4ccc4d1d5a
|
@ -89,7 +89,7 @@ class OAuth2BasicAuthenticator < ::Auth::OAuth2Authenticator
|
||||||
.post_form(URI(user_json_url), 'Authorization' => bearer_token)
|
.post_form(URI(user_json_url), 'Authorization' => bearer_token)
|
||||||
.body
|
.body
|
||||||
else
|
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
|
end
|
||||||
|
|
||||||
user_json = JSON.parse(user_json_response)
|
user_json = JSON.parse(user_json_response)
|
||||||
|
|
Loading…
Reference in New Issue