Class: OmniAuth::Strategies::Tapjoy
- Inherits:
-
OAuth2
- Object
- OAuth2
- OmniAuth::Strategies::Tapjoy
- Defined in:
- lib/omniauth/strategies/tapjoy.rb
Class Method Summary collapse
- .authorize_path ⇒ Object
-
.reconfigure ⇒ Object
If you overwrite ENV settings in your application, for example in a rails environment setup, you will have to call OmniAuth::Strategies::Tapjoy.reconfigure to propagate your changes.
- .site ⇒ Object
Instance Method Summary collapse
Class Method Details
.authorize_path ⇒ Object
27 28 29 30 31 32 33 34 35 36 |
# File 'lib/omniauth/strategies/tapjoy.rb', line 27 def self. if ENV['TAPJOY_AUTH_PATH'] ENV['TAPJOY_AUTH_PATH'] elsif ENV['TAPJOY_AUTH_ENV'] == 'staging' # Staging path is currently the same as production "/oauth/authorize" else "/oauth/authorize" end end |
.reconfigure ⇒ Object
If you overwrite ENV settings in your application, for example in a rails environment setup, you will have to call OmniAuth::Strategies::Tapjoy.reconfigure to propagate your changes.
10 11 12 13 14 15 |
# File 'lib/omniauth/strategies/tapjoy.rb', line 10 def self.reconfigure option :client_options, { :site => site, :authorize_path => } end |
.site ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lib/omniauth/strategies/tapjoy.rb', line 17 def self.site if ENV['TAPJOY_AUTH_SITE'] ENV['TAPJOY_AUTH_SITE'] elsif ENV['TAPJOY_AUTH_ENV'] == 'staging' 'https://mystique-staging.herokuapp.com' else "https://oauth.tapjoy.com" end end |
Instance Method Details
#raw_info ⇒ Object
46 47 48 |
# File 'lib/omniauth/strategies/tapjoy.rb', line 46 def raw_info @raw_info ||= access_token.get('/api/v1/me.json').parsed end |