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

Constructor Details

#initialize(app, store = nil, options = {}, &block) ⇒ 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 = {}, &block)
  options[:name] ||= 'google_apps'
  super(app, store, options, &block)
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(:title => '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