class OmniAuth::Strategies::Pinterest

Public Instance Methods

authorize_params() click to toggle source

You can pass display, scope, or auth_type params to the auth request, if you need to set them dynamically. You can also set these options in the OmniAuth config :authorize_params option.

For example: /auth/facebook?display=popup

Calls superclass method
# File lib/omniauth/strategies/pinterest.rb, line 35
def authorize_params
  super.tap do |params|
    %w[display scope auth_type].each do |v|
      if request.params[v]
        params[v.to_sym] = request.params[v]
      end
    end

    params[:scope] ||= DEFAULT_SCOPE
  end
end
callback_url() click to toggle source
# File lib/omniauth/strategies/pinterest.rb, line 47
  def callback_url
  full_host + script_name + callback_path
end
raw_info() click to toggle source
# File lib/omniauth/strategies/pinterest.rb, line 22
def raw_info
  fields = 'first_name,id,last_name,url,account_type,username,bio,image'
  @raw_info ||= access_token.get("/v1/me/?fields=#{fields}").parsed['data']
end
request_phase() click to toggle source
Calls superclass method
# File lib/omniauth/strategies/pinterest.rb, line 12
def request_phase
  options[:scope] ||= 'read_public'
  options[:response_type] ||= 'code'
  super
end
ssl?() click to toggle source
# File lib/omniauth/strategies/pinterest.rb, line 27
def ssl?
  true
end