class OAuth2::Strategy::AuthCode
The Authorization Code Strategy
Public Instance Methods
get_token(code, params = {}, opts = {})
click to toggle source
Retrieve an access token given the specified validation code.
@param [String] code The Authorization Code value @param [Hash] params additional params @param [Hash] opts options @note that you must also provide a :redirect_uri with most OAuth 2.0 providers
# File lib/oauth2/strategy/auth_code.rb, line 27 def get_token(code, params = {}, opts = {}) params = {'grant_type' => 'authorization_code', 'code' => code}.merge(client_params).merge(params) @client.get_token(params, opts) end