Class: OmniAuth::Strategies::Participa

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

Instance Method Summary collapse

Instance Method Details

#authorize_paramsObject



18
19
20
21
22
23
24
25
26
# File 'lib/omniauth/strategies/participa.rb', line 18

def authorize_params
  super.tap do |params|
    options[:authorize_options].each do |k|
      params[k] = request.params[k.to_s] unless [nil, ''].include?(request.params[k.to_s])
    end

    params[:scope] = params[:scope].split(' ').map {|item| item.split(',')}.flatten.join(' ')
  end
end

#callback_urlObject



49
50
51
# File 'lib/omniauth/strategies/participa.rb', line 49

def callback_url
  options[:redirect_uri] || (full_host + script_name + callback_path)
end

#raw_infoObject



43
44
45
# File 'lib/omniauth/strategies/participa.rb', line 43

def raw_info
  @raw_info ||= access_token.get(options[:client_options][:endpoint_url]).parsed
end