Class: OmniAuth::Strategies::GoogleApps

Inherits:
OpenID
  • Object
show all
Defined in:
lib/omniauth/strategies/google_apps.rb

Constant Summary

Constants inherited from OpenID

OpenID::AX, OpenID::IDENTIFIER_URL_PARAMETER

Instance Attribute Summary

Attributes inherited from OpenID

#options

Instance Method Summary collapse

Methods inherited from OpenID

#auth_hash, #ax_user_info, #callback_phase, #callback_url, #dummy_app, #request_phase, #sreg_user_info, #start, #user_info

Constructor Details

#initialize(app, store = nil, options = {}) ⇒ GoogleApps

Returns a new instance of GoogleApps.



6
7
8
9
# File 'lib/omniauth/strategies/google_apps.rb', line 6

def initialize(app, store = nil, options = {})
  options[:name] ||= 'google_apps'
  super(app, store, options)
end

Instance Method Details

#get_identifierObject



11
12
13
14
15
16
# File 'lib/omniauth/strategies/google_apps.rb', line 11

def get_identifier
  OmniAuth::Form.build('Google Apps Authentication') do
    label_field('Google Apps Domain', 'domain')
    input_field('url', 'domain')
  end.to_response
end

#identifierObject



18
19
20
# File 'lib/omniauth/strategies/google_apps.rb', line 18

def identifier
  options[:domain] || request['domain']
end