Class: OauthRails::OauthController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- OauthRails::OauthController
- Defined in:
- app/controllers/oauth_rails/oauth_controller.rb
Instance Method Summary collapse
Instance Method Details
#authorize ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'app/controllers/oauth_rails/oauth_controller.rb', line 11 def return OAuthRails.call(:initialize_authorization_failed, self) if request_token_hash.nil? if access_token OAuthRails.call(:authorization_successful, self, access_token.token, access_token.secret) else OAuthRails.call(:authorization_failed, self) end end |
#handshake ⇒ Object
2 3 4 5 6 7 8 9 |
# File 'app/controllers/oauth_rails/oauth_controller.rb', line 2 def handshake OAuthRails.call(:initialize_handshake, self) token = consumer.get_request_token(oauth_callback: OAuthRails.config.oauth_callback_url) session[:oauth_rails] = { token: token.token, secret: token.secret } redirect_to token. end |