Class: OmniAuth::Strategies::Twitter
- Inherits:
-
OAuth
- Object
- OAuth
- OmniAuth::Strategies::Twitter
- Defined in:
- lib/omniauth/strategies/twitter.rb
Instance Method Summary collapse
Instance Method Details
#old_request_phase ⇒ Object
39 |
# File 'lib/omniauth/strategies/twitter.rb', line 39 alias :old_request_phase :request_phase |
#raw_info ⇒ Object
33 34 35 36 37 |
# File 'lib/omniauth/strategies/twitter.rb', line 33 def raw_info @raw_info ||= MultiJson.load(access_token.get('/1.1/account/verify_credentials.json?include_entities=false&skip_status=true').body) rescue ::Errno::ETIMEDOUT raise ::Timeout::Error end |
#request_phase ⇒ Object
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/omniauth/strategies/twitter.rb', line 41 def request_phase %w[force_login lang screen_name].each do |v| if request.params[v] [:authorize_params][v.to_sym] = request.params[v] end end %w[x_auth_access_type].each do |v| if request.params[v] [:request_params][v.to_sym] = request.params[v] end end if request.params['use_authorize'] == 'true' [:client_options][:authorize_path] = '/oauth/authorize' else [:client_options][:authorize_path] = '/oauth/authenticate' end old_request_phase end |