lib/omnicontacts/authorization/oauth2.rb in omnicontacts-0.1.5 vs lib/omnicontacts/authorization/oauth2.rb in omnicontacts-0.1.6
- old
+ new
@@ -25,17 +25,17 @@
private
def authorize_url_params
to_query_string({
- :client_id => client_id,
- :scope => encode(scope),
- :response_type => "code",
- :access_type => "offline",
- :approval_prompt => "force",
- :redirect_uri => encode(redirect_uri)
- })
+ :client_id => client_id,
+ :scope => encode(scope),
+ :response_type => "code",
+ :access_type => "offline",
+ :approval_prompt => "force",
+ :redirect_uri => encode(redirect_uri)
+ })
end
public
# Fetches the access token from the authorization server using the given authorization code.
@@ -56,11 +56,11 @@
end
def access_token_from_response response
json = JSON.parse(response)
raise json["error"] if json["error"]
- [ json["access_token"], json["token_type"], json["refresh_token"] ]
+ [json["access_token"], json["token_type"], json["refresh_token"]]
end
public
# Refreshes the access token using the provided refresh_token.
@@ -75,10 +75,10 @@
:client_id => client_id,
:client_secret => client_secret,
:refresh_token => refresh_token,
:grant_type => "refresh_token"
}
-
+
end
end
end
end