class OmniAuth::Strategies::Workingnotworking

Public Instance Methods

authorize_params() click to toggle source

To make the `state` param actually useful, encode any additional params on the request to /auth/workingnotworking into the `state` param sent to the provider.

# File lib/omniauth/strategies/workingnotworking.rb, line 56
def authorize_params
  options.authorize_params[:state] = SecureRandom.hex(24) + '|' + Base64.strict_encode64(request.params.to_param)
  params = options.authorize_params.merge(options_for("authorize"))
  if OmniAuth.config.test_mode
    @env ||= {}
    @env["rack.session"] ||= {}
  end
  session["omniauth.state"] = params[:state]
  params
end
callback_url() click to toggle source
# File lib/omniauth/strategies/workingnotworking.rb, line 73
def callback_url
  full_host + script_name + callback_path
end
raw_info() click to toggle source
# File lib/omniauth/strategies/workingnotworking.rb, line 67
def raw_info
  @raw_info ||= access_token.get('/api/v1/account').parsed
rescue ::Errno::ETIMEDOUT
  raise ::Timeout::Error
end