warden-googleapps 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -29,6 +29,7 @@ app.rb
29
29
 
30
30
  manager[:google_apps_domain] = 'example.org'
31
31
  # manager[:google_apps_endpoint] = 'http://www.google.com/accounts/o8/id' # this is gmail
32
+ # manager[:redirect_url] = 'http://example.org/verify_url' # endpoint where google apps redirects to after successful authentication
32
33
  end
33
34
 
34
35
  helpers do
@@ -31,7 +31,7 @@ Warden::Strategies.add(:google_apps) do
31
31
  google_discovery = OpenID.discover(open_id_endpoint)
32
32
  open_id_request = consumer.begin(google_discovery.first)
33
33
  add_ax_fields(open_id_request)
34
- redirect!(open_id_request.redirect_url(absolute_url(request), absolute_url(request)))
34
+ redirect!(open_id_request.redirect_url(absolute_url(request), redirect_url(request)))
35
35
  end
36
36
  end
37
37
 
@@ -60,6 +60,10 @@ Warden::Strategies.add(:google_apps) do
60
60
  endpoint || domain
61
61
  end
62
62
 
63
+ def redirect_url(request)
64
+ env['warden'].config[:google_apps_redirect_url] || absolute_url(request, request.path)
65
+ end
66
+
63
67
  def add_ax_fields(open_id_request)
64
68
  ax_request = ::OpenID::AX::FetchRequest.new
65
69
 
@@ -1,5 +1,5 @@
1
1
  module Warden
2
2
  module GoogleApps
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: warden-googleapps
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 25
4
5
  prerelease: false
5
6
  segments:
6
7
  - 0
7
8
  - 1
8
- - 0
9
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
10
11
  platform: ruby
11
12
  authors:
12
13
  - Corey Donohoe
@@ -14,36 +15,40 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2010-04-16 00:00:00 -07:00
18
+ date: 2010-06-29 00:00:00 -07:00
18
19
  default_executable:
19
20
  dependencies:
20
21
  - !ruby/object:Gem::Dependency
21
- requirement: &id001 !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ version_requirements: &id001 !ruby/object:Gem::Requirement
24
+ none: false
22
25
  requirements:
23
26
  - - ~>
24
27
  - !ruby/object:Gem::Version
28
+ hash: 31
25
29
  segments:
26
30
  - 0
27
31
  - 10
28
32
  version: "0.10"
29
- prerelease: false
33
+ requirement: *id001
30
34
  type: :runtime
31
35
  name: warden
32
- version_requirements: *id001
33
36
  - !ruby/object:Gem::Dependency
34
- requirement: &id002 !ruby/object:Gem::Requirement
37
+ prerelease: false
38
+ version_requirements: &id002 !ruby/object:Gem::Requirement
39
+ none: false
35
40
  requirements:
36
41
  - - ~>
37
42
  - !ruby/object:Gem::Version
43
+ hash: 5
38
44
  segments:
39
45
  - 2
40
46
  - 1
41
47
  - 7
42
48
  version: 2.1.7
43
- prerelease: false
49
+ requirement: *id002
44
50
  type: :runtime
45
51
  name: ruby-openid
46
- version_requirements: *id002
47
52
  description: A warden strategy to use Google's Federated OpenID with Google Apps
48
53
  email: atmos@atmos.org
49
54
  executables: []
@@ -72,23 +77,27 @@ rdoc_options: []
72
77
  require_paths:
73
78
  - lib
74
79
  required_ruby_version: !ruby/object:Gem::Requirement
80
+ none: false
75
81
  requirements:
76
82
  - - ">="
77
83
  - !ruby/object:Gem::Version
84
+ hash: 3
78
85
  segments:
79
86
  - 0
80
87
  version: "0"
81
88
  required_rubygems_version: !ruby/object:Gem::Requirement
89
+ none: false
82
90
  requirements:
83
91
  - - ">="
84
92
  - !ruby/object:Gem::Version
93
+ hash: 3
85
94
  segments:
86
95
  - 0
87
96
  version: "0"
88
97
  requirements: []
89
98
 
90
99
  rubyforge_project:
91
- rubygems_version: 1.3.6
100
+ rubygems_version: 1.3.7
92
101
  signing_key:
93
102
  specification_version: 3
94
103
  summary: A warden strategy to use Google's Federated OpenID with Google Apps