Class: OmniAuth::Strategies::Positionly

Inherits:
OAuth2
  • Object
show all
Defined in:
lib/omniauth/strategies/positionly.rb

Constant Summary collapse

DEFAULT_SCOPE =
"read"

Instance Method Summary collapse

Instance Method Details

#authorize_paramsObject



17
18
19
20
21
22
23
24
# File 'lib/omniauth/strategies/positionly.rb', line 17

def authorize_params
  super.tap do |params|
    %w(scope account_domain).each do |k|
      params[k.to_sym] = request.params[k] unless [nil, ''].include?(request.params[k])
    end
    params[:scope] ||= DEFAULT_SCOPE
  end
end

#raw_infoObject



38
39
40
# File 'lib/omniauth/strategies/positionly.rb', line 38

def raw_info
  @raw_info ||= access_token.get("/v1/addons/user.json").parsed
end