lib/authlogic_connect/oauth/process.rb in authlogic-connect-0.0.1 vs lib/authlogic_connect/oauth/process.rb in authlogic-connect-0.0.2
- old
+ new
@@ -1,10 +1,10 @@
module AuthlogicConnect::Oauth
module Process
private
- include Variables
+ include AuthlogicConnect::Oauth::Variables
def validate_by_oauth
validate_email_field = false
if oauth_response.blank?
@@ -24,11 +24,11 @@
if oauth_version == 1.0
request = oauth_token.get_request_token(oauth_callback_url)
save_auth_session(request)
auth_controller.redirect_to request.authorize_url
else
- auth_controller.redirect_to oauth_client.web_server.authorize_url(
+ auth_controller.redirect_to oauth_consumer.web_server.authorize_url(
:redirect_uri => oauth_callback_url,
:scope => oauth_token.settings[:scope]
)
end
end
@@ -62,20 +62,20 @@
def oauth_key_and_secret
if oauth_version == 1.0
result = request_token.get_access_token(:oauth_verifier => auth_params[:oauth_verifier])
result = {:key => result.token, :secret => result.secret}
else
- result = oauth_client.web_server.get_access_token(oauth_key, :redirect_uri => oauth_callback_url)
+ result = oauth_consumer.web_server.get_access_token(oauth_key, :redirect_uri => oauth_callback_url)
result = {:key => result.token, :secret => oauth_key}
end
result
end
def generate_access_token
if oauth_version == 1.0
request_token.get_access_token(:oauth_verifier => auth_params[:oauth_verifier])
else
- oauth_client.web_server.get_access_token(oauth_key, :redirect_uri => oauth_callback_url)
+ oauth_consumer.web_server.get_access_token(oauth_key, :redirect_uri => oauth_callback_url)
end
end
end
end
\ No newline at end of file