Skip to content

Commit

Permalink
Merge branch 'glassbead0-auth_code_flow_match_rfc'
Browse files Browse the repository at this point in the history
closes #51
  • Loading branch information
scrogson committed Apr 6, 2016
2 parents 5fa3f33 + 74b2fdf commit 7cc23d4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/oauth2/strategy/auth_code.ex
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ defmodule OAuth2.Strategy.AuthCode do
|> put_param(:code, code)
|> put_param(:grant_type, "authorization_code")
|> put_param(:client_id, client.client_id)
|> put_param(:client_secret, client.client_secret)
|> put_param(:response_type, "code")
|> put_param(:redirect_uri, client.redirect_uri)
|> merge_params(params)
|> put_headers(headers)
Expand Down
2 changes: 1 addition & 1 deletion test/oauth2/client_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ defmodule OAuth2.ClientTest do
refute conn.query_string == ""
assert conn.query_params["code"] == "code1234"
assert conn.query_params["redirect_uri"]
assert conn.query_params["client_secret"]
assert conn.query_params["response_type"] == "code"
send_resp(conn, 200, ~s({"access_token":"test1234"}))
end

Expand Down
2 changes: 1 addition & 1 deletion test/oauth2/strategy/auth_code_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ defmodule OAuth2.Strategy.AuthCodeTest do
assert body["grant_type"] == "authorization_code"
assert body["code"] == code
assert body["client_id"] == client.client_id
assert body["client_secret"] == client.client_secret
assert body["response_type"] == "code"
assert body["redirect_uri"] == client.redirect_uri

send_resp(conn, 302, ~s({"access_token":"#{access_token}"}))
Expand Down

0 comments on commit 7cc23d4

Please sign in to comment.