Class: OmniAuth::Strategies::Authic

Inherits:
OAuth2
  • Object
show all
Defined in:
lib/omniauth/strategies/authic.rb

Instance Method Summary collapse

Instance Method Details

#clientObject



47
48
49
50
51
52
53
# File 'lib/omniauth/strategies/authic.rb', line 47

def client
  raise "You must specify your Authic subdomain in setup i.e. :subdomain => 'mysubdomain'" if options[:subdomain].blank?
  scheme = options[:ssl] ? "https" : "http"
  # Make sure we set the site correctly before creating a client
  options[:client_options][:site] = "#{scheme}://#{options[:subdomain]}.#{options[:domain]}"
  super
end

#raw_infoObject



55
56
57
# File 'lib/omniauth/strategies/authic.rb', line 55

def raw_info
  @raw_info ||= access_token.get("/authic_user_info.json").parsed
end

#request_phaseObject



41
42
43
44
45
# File 'lib/omniauth/strategies/authic.rb', line 41

def request_phase
  # Add authic_action into the params mix. This will let the Authic server know to serve up the signup or signin page
  options.authorize_params[:authic_action] = request.params["authic_action"]
  super
end