Class: OmniAuth::Strategies::SoundCloud
- Inherits:
-
OAuth2
- Object
- OAuth2
- OmniAuth::Strategies::SoundCloud
- Defined in:
- lib/omniauth/strategies/soundcloud.rb
Constant Summary collapse
- DEFAULT_SCOPE =
'non-expiring'
Instance Method Summary collapse
- #access_token_options ⇒ Object
- #authorize_params ⇒ Object
- #build_access_token ⇒ Object
- #raw_info ⇒ Object
Instance Method Details
#access_token_options ⇒ Object
59 60 61 |
# File 'lib/omniauth/strategies/soundcloud.rb', line 59 def ..inject({}) { |h,(k,v)| h[k.to_sym] = v; h } end |
#authorize_params ⇒ Object
63 64 65 66 67 68 |
# File 'lib/omniauth/strategies/soundcloud.rb', line 63 def super.tap do |params| %w[display state scope].each { |v| params[v.to_sym] = request.params[v] if request.params[v] } params[:scope] ||= DEFAULT_SCOPE end end |
#build_access_token ⇒ Object
53 54 55 56 57 |
# File 'lib/omniauth/strategies/soundcloud.rb', line 53 def build_access_token super.tap do |token| token..merge!() end end |
#raw_info ⇒ Object
49 50 51 |
# File 'lib/omniauth/strategies/soundcloud.rb', line 49 def raw_info @raw_info ||= access_token.get('/me.json').parsed end |