Skip to content

Commit

Permalink
update parameters to follow OAuth 2.0 draft 10 which facebook and oth…
Browse files Browse the repository at this point in the history
…er major OAuth2 servers now support
  • Loading branch information
nov committed Jan 31, 2011
1 parent ce16d32 commit 1dbfe18
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/oauth2/access_token.rb
Expand Up @@ -10,7 +10,7 @@ def initialize(client, token, refresh_token = nil, expires_in = nil, params = {}
@expires_in = (expires_in.nil? || expires_in == '') ? nil : expires_in.to_i
@expires_at = Time.now + @expires_in if @expires_in
@params = params
@token_param = 'access_token'
@token_param = 'oauth_token'
end

def [](key)
Expand Down
4 changes: 2 additions & 2 deletions lib/oauth2/strategy/web_server.rb
Expand Up @@ -4,7 +4,7 @@ module OAuth2
module Strategy
class WebServer < Base
def authorize_params(options = {}) #:nodoc:
super(options).merge('type' => 'web_server')
super(options).merge('response_type' => 'code')
end

# Retrieve an access token given the specified validation code.
Expand Down Expand Up @@ -35,7 +35,7 @@ def access_token(*args)

def access_token_params(code, options = {}) #:nodoc:
super(options).merge({
'type' => 'web_server',
'grant_type' => 'authorization_code',
'code' => code
})
end
Expand Down

0 comments on commit 1dbfe18

Please sign in to comment.