class OmniAuth::Strategies::EbayOauth
OmniAuth
strategy for eBay
Public Instance Methods
callback_phase()
click to toggle source
Calls superclass method
# File lib/omniauth/strategies/ebay_oauth.rb, line 36 def callback_phase super rescue ::OmniAuth::EbayOauth::UserSuspended => e fail!(:user_suspended, e) end
callback_url()
click to toggle source
# File lib/omniauth/strategies/ebay_oauth.rb, line 42 def callback_url options.callback_url end
setup_phase()
click to toggle source
Calls superclass method
# File lib/omniauth/strategies/ebay_oauth.rb, line 30 def setup_phase options.scope = preprocessed_scopes options.client_options.merge!(environment_urls) super end
Private Instance Methods
environment_urls()
click to toggle source
# File lib/omniauth/strategies/ebay_oauth.rb, line 59 def environment_urls if options.sandbox options.sandbox_client_options else options.production_client_options end end
preprocessed_scopes()
click to toggle source
# File lib/omniauth/strategies/ebay_oauth.rb, line 55 def preprocessed_scopes Array(options.scope).join(' ') end
user_credentials()
click to toggle source
# File lib/omniauth/strategies/ebay_oauth.rb, line 48 def user_credentials self.class.superclass.credentials_stack(self).first.merge( 'refresh_token_expires_at' => access_token['refresh_token_expires_in'].to_i + Time.now.to_i ) end
user_info()
click to toggle source
# File lib/omniauth/strategies/ebay_oauth.rb, line 67 def user_info @user_info ||= OmniAuth::EbayOauth::UserInfo.new(OmniAuth::EbayOauth::UserInfoRequest .new(access_token.token, **client.options).call) end