Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

update parameters to follow OAuth 2.0 draft 10 which facebook and oth…

…er major OAuth2 servers now support
  • Loading branch information...
commit 1dbfe18af997c45a69fdea29192f599f20d80879 1 parent ce16d32
@nov nov authored
Showing with 3 additions and 3 deletions.
  1. +1 −1  lib/oauth2/access_token.rb
  2. +2 −2 lib/oauth2/strategy/web_server.rb
View
2  lib/oauth2/access_token.rb
@@ -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)
View
4 lib/oauth2/strategy/web_server.rb
@@ -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.
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.