class OmniAuth::Strategies::OAuth2Generic

Public Instance Methods

authorize_params() click to toggle source
Calls superclass method
# File lib/omniauth/strategies/oauth2_generic.rb, line 87
def authorize_params
  params = super
  params.transform_values { |v| v.respond_to?(:call) ? v.call(request) : v }
end
raw_info() click to toggle source
# File lib/omniauth/strategies/oauth2_generic.rb, line 82
def raw_info
  @raw_info ||= access_token.get(options.client_options[:user_info_url]).parsed
end

Private Instance Methods

callback_url() click to toggle source
# File lib/omniauth/strategies/oauth2_generic.rb, line 115
def callback_url
  options.redirect_url || (full_host + script_name + callback_path)
end
fetch_user_info(path) click to toggle source
# File lib/omniauth/strategies/oauth2_generic.rb, line 101
def fetch_user_info(path)
  return nil unless path

  full_path = path.is_a?(Array) ? path : Array(user_paths[:root_path]) + [path]
  full_path.inject(raw_info) do |info, key|
    begin # rubocop:disable Style/RedundantBegin
      info[key]
    rescue StandardError
      nil
    end
  end
end
user_paths() click to toggle source
# File lib/omniauth/strategies/oauth2_generic.rb, line 96
def user_paths
  options.user_response_structure
end