Skip to content

Commit

Permalink
Adds support for Google Apps for the domain.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Bleigh committed Jul 19, 2010
1 parent db45e50 commit 490e233
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 12 deletions.
2 changes: 1 addition & 1 deletion oa-openid/Gemfile
@@ -1,7 +1,7 @@
source "http://rubygems.org"

gem 'oa-core', :path => File.expand_path('../../oa-core/', __FILE__)

gem 'ruby-openid-apps-discovery'
# Will automatically pull in this gem and all its
# dependencies specified in the gemspec
gem 'oa-openid', :path => File.expand_path("..", __FILE__)
Expand Down
2 changes: 1 addition & 1 deletion oa-openid/lib/omniauth/openid.rb
Expand Up @@ -3,6 +3,6 @@
module OmniAuth
module Strategies
autoload :OpenID, 'omniauth/strategies/open_id'
autoload :Google, 'omniauth/strategies/google'
autoload :GoogleApps, 'omniauth/strategies/google_apps'
end
end
9 changes: 0 additions & 9 deletions oa-openid/lib/omniauth/strategies/google.rb

This file was deleted.

17 changes: 17 additions & 0 deletions oa-openid/lib/omniauth/strategies/google_apps.rb
@@ -0,0 +1,17 @@
require 'omniauth/openid'

module OmniAuth
module Strategies
class GoogleApps < OmniAuth::Strategies::OpenID
def initialize(app, domain, store = nil, options = {})
@domain = domain
options[:name] ||= 'apps'
super(app, store, options)
end

def identifier
@domain
end
end
end
end
1 change: 1 addition & 0 deletions oa-openid/lib/omniauth/strategies/open_id.rb
@@ -1,4 +1,5 @@
require 'rack/openid'
require 'gapps_openid'
require 'omniauth/openid'

module OmniAuth
Expand Down
3 changes: 2 additions & 1 deletion oa-openid/oa-openid.gemspec
Expand Up @@ -11,8 +11,9 @@ Gem::Specification.new do |gem|

gem.files = Dir.glob("{lib}/**/*") + %w(README.rdoc LICENSE.rdoc CHANGELOG.rdoc)

gem.add_dependency 'oa-core', version
gem.add_dependency 'oa-core', version
gem.add_dependency 'rack-openid', '~> 1.0.3'
gem.add_dependency 'ruby-openid-apps-discovery'

eval File.read(File.join(File.dirname(__FILE__), '../development_dependencies.rb'))
end

0 comments on commit 490e233

Please sign in to comment.