class OmniAuth::Strategies::Pixiv

Constants

RAW_INFO_URL

Public Instance Methods

authorize_params() click to toggle source
Calls superclass method
# File lib/omniauth/strategies/pixiv.rb, line 49
def authorize_params
  super.tap do |params|
    # Pass through request_type as part of oauth state parameter.
    state_with_request_type = "security_token=#{params[:state]},request_type=#{request.params['request_type'] || 'default'}"
    session['omniauth.state'] = params[:state] = request.params['state'] = state_with_request_type
  end
end
callback_url() click to toggle source
# File lib/omniauth/strategies/pixiv.rb, line 41
def callback_url
  full_host + script_name + callback_path
end
client() click to toggle source
# File lib/omniauth/strategies/pixiv.rb, line 33
def client
  ::OAuth2::Client.new(options.client_id, options.client_secret, deep_symbolize(options.client_options)) do |faraday|
    faraday.request :url_encoded
    faraday.request :user_agent, options[:user_agent]
    faraday.adapter Faraday.default_adapter
  end
end
raw_info() click to toggle source
# File lib/omniauth/strategies/pixiv.rb, line 45
def raw_info
  @raw_info ||= access_token.get(RAW_INFO_URL).parsed['response'].first
end