Class: OmniAuth::Strategies::Twitter2
- Inherits:
-
OAuth2
- Object
- OAuth2
- OmniAuth::Strategies::Twitter2
- Defined in:
- lib/omniauth/strategies/twitter2.rb
Overview
:nodoc:
Instance Method Summary collapse
- #build_access_token ⇒ Object
-
#callback_url ⇒ Object
github.com/zquestz/omniauth-google-oauth2/blob/475efe41ecfcf04b63921bd723ccf6fad429d1b1/lib/omniauth/strategies/google_oauth2.rb#L105 github.com/simi/omniauth-facebook/blob/e1e572db2e9464871c98148621df1bbbe1e9f9c3/lib/omniauth/strategies/facebook.rb#L88 github.com/omniauth/omniauth-oauth2/commit/85fdbe117c2a4400d001a6368cc359d88f40abc7.
- #raw_info ⇒ Object
Instance Method Details
#build_access_token ⇒ Object
54 55 56 57 58 59 60 61 |
# File 'lib/omniauth/strategies/twitter2.rb', line 54 def build_access_token .token_params.merge!( headers: { "Authorization" => "Basic #{Base64.strict_encode64("#{options[:client_id]}:#{options[:client_secret]}")}" } ) super end |
#callback_url ⇒ Object
github.com/zquestz/omniauth-google-oauth2/blob/475efe41ecfcf04b63921bd723ccf6fad429d1b1/lib/omniauth/strategies/google_oauth2.rb#L105 github.com/simi/omniauth-facebook/blob/e1e572db2e9464871c98148621df1bbbe1e9f9c3/lib/omniauth/strategies/facebook.rb#L88 github.com/omniauth/omniauth-oauth2/commit/85fdbe117c2a4400d001a6368cc359d88f40abc7
50 51 52 |
# File 'lib/omniauth/strategies/twitter2.rb', line 50 def callback_url [:callback_url] || (full_host + script_name + callback_path) end |
#raw_info ⇒ Object
38 39 40 41 42 43 44 45 |
# File 'lib/omniauth/strategies/twitter2.rb', line 38 def raw_info @raw_info ||= access_token.get( "/2/users/me?" \ "&user.fields=created_at,description,entities,id,location,name,pinned_tweet_id," \ "profile_image_url,protected,public_metrics,url,username,verified,withheld", { headers: { "Authorization" => "Bearer #{access_token.token}" } } ).parsed || {} end |