1
0
Fork 0
mirror of https://github.com/omniauth/omniauth.git synced 2022-11-09 12:31:49 -05:00

Updating GApps and OpenID strategies a bit.

This commit is contained in:
Michael Bleigh 2010-08-10 08:35:06 -05:00
parent 7300af48a4
commit 549b0c71e2
2 changed files with 7 additions and 6 deletions

View file

@ -3,14 +3,13 @@ require 'omniauth/openid'
module OmniAuth
module Strategies
class GoogleApps < OmniAuth::Strategies::OpenID
def initialize(app, domain, store = nil, options = {})
@domain = domain
options[:name] ||= 'apps'
def initialize(app, store = nil, options = {})
options[:name] ||= 'google_apps'
super(app, store, options)
end
def identifier
@domain
options[:domain] || request['domain']
end
end
end

View file

@ -7,6 +7,8 @@ module OmniAuth
class OpenID
include OmniAuth::Strategy
attr_accessor :options
# Should be 'openid_url'
# @see http://github.com/intridea/omniauth/issues/issue/13
IDENTIFIER_URL_PARAMETER = 'identifier'
@ -26,8 +28,8 @@ module OmniAuth
def initialize(app, store = nil, options = {})
super(app, options[:name] || :open_id)
@options = options
@options[:required] ||= [AX[:email], AX[:name], 'email', 'fullname']
@options[:optional] ||= [AX[:first_name], AX[:last_name], AX[:nickname], AX[:city], AX[:state], AX[:website], AX[:image], 'postcode', 'nickname']
@options[:required] ||= [AX[:email], AX[:first_name], AZ[:last_name], 'email', 'fullname']
@options[:optional] ||= [AX[:nickname], AX[:city], AX[:state], AX[:website], AX[:image], 'postcode', 'nickname']
@store = store
end