Skip to content

Commit

Permalink
Merge branch '431_issue_v1_4_11' into '1-4-stable'
Browse files Browse the repository at this point in the history
Fix issue 431 in v1-stable

See merge request oauth-xx/oauth2!637
  • Loading branch information
pboling committed Aug 1, 2023
2 parents d41fb6e + 2466989 commit 69ed5c3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/oauth2/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,11 @@ def get_token(params, access_token_opts = {}, extract_access_token = options[:ex
opts = {:raise_errors => options[:raise_errors], :parse => params.delete(:parse)}
headers = params.delete(:headers) || {}
if options[:token_method] == :post
opts[:body] = params
opts[:body] = if headers['Content-Type'] == 'application/json'
params.to_json
else
params
end
opts[:headers] = {'Content-Type' => 'application/x-www-form-urlencoded'}
else
opts[:params] = params
Expand Down

0 comments on commit 69ed5c3

Please sign in to comment.