class OmniAuth::Strategies::TranslationExchange

Public Instance Methods

authorize_params() click to toggle source
Calls superclass method
# File lib/omniauth/strategies/translation_exchange.rb, line 86
def authorize_params
  super.tap do |params|
    params.merge!(:display => request.params['display']) if request.params['display']
    params.merge!(:state => request.params['state']) if request.params['state']
  end
end
callback_url() click to toggle source

fix for the 1.4 and doorkeeper

# File lib/omniauth/strategies/translation_exchange.rb, line 82
def callback_url
  full_host + script_name + callback_path
end
raw_info() click to toggle source
# File lib/omniauth/strategies/translation_exchange.rb, line 77
def raw_info
  @raw_info ||= access_token.get('/v2/users/me').parsed
end

Private Instance Methods

prune!(hash) click to toggle source
# File lib/omniauth/strategies/translation_exchange.rb, line 95
def prune!(hash)
  hash.delete_if do |_, value|
    prune!(value) if value.is_a?(Hash)
    value.nil? || (value.respond_to?(:empty?) && value.empty?)
  end
end