Skip to content

Commit

Permalink
this does not provide authentication, should not be used
Browse files Browse the repository at this point in the history
  • Loading branch information
mkdynamic committed Nov 14, 2013
1 parent fd62381 commit 115c0a7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 22 deletions.
7 changes: 1 addition & 6 deletions lib/omniauth/strategies/facebook.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,7 @@ def raw_info
end

def build_access_token
if access_token = request.params["access_token"]
::OAuth2::AccessToken.from_hash(
client,
{"access_token" => access_token}.update(access_token_options)
)
elsif signed_request_contains_access_token?
if signed_request_contains_access_token?
hash = signed_request.clone
::OAuth2::AccessToken.new(
client,
Expand Down
16 changes: 0 additions & 16 deletions test/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -469,20 +469,4 @@ def setup
assert_equal @payload['expires'], result.expires_at
end
end

class ParamsContainAccessTokenStringTest < TestCase
def setup
super

@request.stubs(:params).returns({'access_token' => 'm4c0d3z'})

strategy.stubs(:callback_url).returns('/')
end

test 'returns a new access token' do
result = strategy.build_access_token
assert_kind_of ::OAuth2::AccessToken, result
assert_equal 'm4c0d3z', result.token
end
end
end

0 comments on commit 115c0a7

Please sign in to comment.