Module: Gappster::ClassMethods

Defined in:
lib/gappster.rb

Instance Method Summary collapse

Instance Method Details

#gappster_authentication(domain, more_options = {}) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/gappster.rb', line 8

def gappster_authentication(domain, more_options={})
  options = {
    :openid_url => "https://www.google.com/accounts/o8/site-xrds?hd=#{domain}",
    :session_var => 'gapps_email',
    :success_path => :root,
    :failure_path => :fail
  }
  options.merge(more_options)

  define_method("authenticate_with_gapps") do
    open_id_authentication(options[:openid_url], options[:success_path], options[:failure_path], options[:session_var])
  end
end