rubycas-server 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,13 @@
1
+ === 1.1.1 :: 2012-06-08
2
+
3
+ * NEW:
4
+ * Google authenticator now has a "restricted_domain" option to allow logins only
5
+ from Google accounts (email addressed) under a specific domain name.
6
+
7
+ * FIXED:
8
+ * When installed as a gem, localization should now work correctly thanks to fixed
9
+ translations path.
10
+
1
11
  === 1.1.0 :: 2012-04-19
2
12
 
3
13
  * NEW:
@@ -282,6 +282,15 @@ database:
282
282
  # username: nil
283
283
  # password: nil
284
284
  #
285
+ # If you want to restrict access to only those Google accounts in a
286
+ # particular domain, as might be the case for an organization that
287
+ # uses Google for its domain's e-mail, add the restricted_domain
288
+ # option:
289
+ #
290
+ #authenticator:
291
+ # class: CASServer::Authenticators::Google
292
+ # restricted_domain: example.com
293
+ #
285
294
  # Note that as with all authenticators, it is possible to use the Google
286
295
  # authenticator alongside other authenticators. For example, CAS can first
287
296
  # attempt to validate the account with Google, and if that fails, fall back
@@ -117,7 +117,7 @@ module CASServer
117
117
  elsif @options[:filter_attributes].kind_of? String
118
118
  attrs = @options[:filter_attributes].split(',').collect { |col| col.strip }
119
119
  else
120
- $LOG.error("Can't figure out attribute list from #{@options[:filter_attributes].inspect}. This must be an Aarray of column names or a comma-separated list.")
120
+ $LOG.error("Can't figure out attribute list from #{@options[:filter_attributes].inspect}. This must be an Array of column names or a comma-separated list.")
121
121
  attrs = []
122
122
  end
123
123
  attrs
@@ -52,7 +52,7 @@ module CASServer
52
52
  elsif @options[:extra_attributes].kind_of? String
53
53
  attrs = @options[:extra_attributes].split(',').collect{|col| col.strip}
54
54
  else
55
- $LOG.error("Can't figure out attribute list from #{@options[:extra_attributes].inspect}. This must be an Aarray of column names or a comma-separated list.")
55
+ $LOG.error("Can't figure out attribute list from #{@options[:extra_attributes].inspect}. This must be an Array of column names or a comma-separated list.")
56
56
  attrs = []
57
57
  end
58
58
 
@@ -13,6 +13,11 @@ class CASServer::Authenticators::Google < CASServer::Authenticators::Base
13
13
 
14
14
  return false if @username.blank? || @password.blank?
15
15
 
16
+ if @options[:restricted_domain]
17
+ return false if @username.count('@') != 1
18
+ return false if @username.split('@').last != @options[:restricted_domain]
19
+ end
20
+
16
21
  auth_data = {
17
22
  'Email' => @username,
18
23
  'Passwd' => @password,
@@ -78,8 +78,6 @@ class CASServer::Authenticators::LDAP < CASServer::Authenticators::Base
78
78
  # the user. If a :filter was specified in the :ldap config, the filter will be
79
79
  # added to the LDAP query for the username.
80
80
  def bind_by_username
81
- username_attribute = options[:ldap][:username_attribute] || default_username_attribute
82
-
83
81
  @ldap.bind_as(:base => @options[:ldap][:base], :password => @password, :filter => user_filter)
84
82
  end
85
83
 
@@ -6,7 +6,7 @@ module CASServer
6
6
  mod.module_eval do
7
7
  register Sinatra::R18n
8
8
  set :default_locale, 'en'
9
- set :translations, './locales'
9
+ set :translations, File.dirname(__FILE__) + "/../../locales"
10
10
  end
11
11
  end
12
12
  end
@@ -1,6 +1,6 @@
1
1
  $gemspec = Gem::Specification.new do |s|
2
2
  s.name = 'rubycas-server'
3
- s.version = '1.1.0'
3
+ s.version = '1.1.1'
4
4
  s.authors = ["Matt Zukowski"]
5
5
  s.email = ["matt@zukowski.ca"]
6
6
  s.homepage = 'https://github.com/rubycas/rubycas-server'
metadata CHANGED
@@ -1,181 +1,254 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: rubycas-server
3
- version: !ruby/object:Gem::Version
4
- version: 1.1.0
3
+ version: !ruby/object:Gem::Version
4
+ hash: 17
5
5
  prerelease:
6
+ segments:
7
+ - 1
8
+ - 1
9
+ - 1
10
+ version: 1.1.1
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - Matt Zukowski
9
14
  autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
- date: 2012-04-19 00:00:00.000000000 -04:00
13
- default_executable:
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
17
+
18
+ date: 2012-06-08 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
16
21
  name: activerecord
17
- requirement: &84634890 !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
18
24
  none: false
19
- requirements:
20
- - - ! '>='
21
- - !ruby/object:Gem::Version
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ hash: 27
29
+ segments:
30
+ - 2
31
+ - 3
32
+ - 12
22
33
  version: 2.3.12
23
34
  - - <
24
- - !ruby/object:Gem::Version
25
- version: '3.1'
35
+ - !ruby/object:Gem::Version
36
+ hash: 5
37
+ segments:
38
+ - 3
39
+ - 1
40
+ version: "3.1"
26
41
  type: :runtime
27
- prerelease: false
28
- version_requirements: *84634890
29
- - !ruby/object:Gem::Dependency
42
+ version_requirements: *id001
43
+ - !ruby/object:Gem::Dependency
30
44
  name: activesupport
31
- requirement: &84634500 !ruby/object:Gem::Requirement
45
+ prerelease: false
46
+ requirement: &id002 !ruby/object:Gem::Requirement
32
47
  none: false
33
- requirements:
34
- - - ! '>='
35
- - !ruby/object:Gem::Version
48
+ requirements:
49
+ - - ">="
50
+ - !ruby/object:Gem::Version
51
+ hash: 27
52
+ segments:
53
+ - 2
54
+ - 3
55
+ - 12
36
56
  version: 2.3.12
37
57
  - - <
38
- - !ruby/object:Gem::Version
39
- version: '3.1'
58
+ - !ruby/object:Gem::Version
59
+ hash: 5
60
+ segments:
61
+ - 3
62
+ - 1
63
+ version: "3.1"
40
64
  type: :runtime
41
- prerelease: false
42
- version_requirements: *84634500
43
- - !ruby/object:Gem::Dependency
65
+ version_requirements: *id002
66
+ - !ruby/object:Gem::Dependency
44
67
  name: sinatra
45
- requirement: &84629790 !ruby/object:Gem::Requirement
68
+ prerelease: false
69
+ requirement: &id003 !ruby/object:Gem::Requirement
46
70
  none: false
47
- requirements:
71
+ requirements:
48
72
  - - ~>
49
- - !ruby/object:Gem::Version
50
- version: '1.0'
73
+ - !ruby/object:Gem::Version
74
+ hash: 15
75
+ segments:
76
+ - 1
77
+ - 0
78
+ version: "1.0"
51
79
  type: :runtime
52
- prerelease: false
53
- version_requirements: *84629790
54
- - !ruby/object:Gem::Dependency
80
+ version_requirements: *id003
81
+ - !ruby/object:Gem::Dependency
55
82
  name: sinatra-r18n
56
- requirement: &84629600 !ruby/object:Gem::Requirement
83
+ prerelease: false
84
+ requirement: &id004 !ruby/object:Gem::Requirement
57
85
  none: false
58
- requirements:
59
- - - ! '>='
60
- - !ruby/object:Gem::Version
61
- version: '0'
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ hash: 3
90
+ segments:
91
+ - 0
92
+ version: "0"
62
93
  type: :runtime
63
- prerelease: false
64
- version_requirements: *84629600
65
- - !ruby/object:Gem::Dependency
94
+ version_requirements: *id004
95
+ - !ruby/object:Gem::Dependency
66
96
  name: crypt-isaac
67
- requirement: &84629320 !ruby/object:Gem::Requirement
97
+ prerelease: false
98
+ requirement: &id005 !ruby/object:Gem::Requirement
68
99
  none: false
69
- requirements:
100
+ requirements:
70
101
  - - ~>
71
- - !ruby/object:Gem::Version
102
+ - !ruby/object:Gem::Version
103
+ hash: 57
104
+ segments:
105
+ - 0
106
+ - 9
107
+ - 1
72
108
  version: 0.9.1
73
109
  type: :runtime
74
- prerelease: false
75
- version_requirements: *84629320
76
- - !ruby/object:Gem::Dependency
110
+ version_requirements: *id005
111
+ - !ruby/object:Gem::Dependency
77
112
  name: rack-test
78
- requirement: &84629100 !ruby/object:Gem::Requirement
113
+ prerelease: false
114
+ requirement: &id006 !ruby/object:Gem::Requirement
79
115
  none: false
80
- requirements:
81
- - - ! '>='
82
- - !ruby/object:Gem::Version
83
- version: '0'
116
+ requirements:
117
+ - - ">="
118
+ - !ruby/object:Gem::Version
119
+ hash: 3
120
+ segments:
121
+ - 0
122
+ version: "0"
84
123
  type: :development
85
- prerelease: false
86
- version_requirements: *84629100
87
- - !ruby/object:Gem::Dependency
124
+ version_requirements: *id006
125
+ - !ruby/object:Gem::Dependency
88
126
  name: capybara
89
- requirement: &84628820 !ruby/object:Gem::Requirement
127
+ prerelease: false
128
+ requirement: &id007 !ruby/object:Gem::Requirement
90
129
  none: false
91
- requirements:
92
- - - =
93
- - !ruby/object:Gem::Version
130
+ requirements:
131
+ - - "="
132
+ - !ruby/object:Gem::Version
133
+ hash: 23
134
+ segments:
135
+ - 1
136
+ - 1
137
+ - 2
94
138
  version: 1.1.2
95
139
  type: :development
96
- prerelease: false
97
- version_requirements: *84628820
98
- - !ruby/object:Gem::Dependency
140
+ version_requirements: *id007
141
+ - !ruby/object:Gem::Dependency
99
142
  name: rspec
100
- requirement: &84628590 !ruby/object:Gem::Requirement
143
+ prerelease: false
144
+ requirement: &id008 !ruby/object:Gem::Requirement
101
145
  none: false
102
- requirements:
103
- - - ! '>='
104
- - !ruby/object:Gem::Version
105
- version: '0'
146
+ requirements:
147
+ - - ">="
148
+ - !ruby/object:Gem::Version
149
+ hash: 3
150
+ segments:
151
+ - 0
152
+ version: "0"
106
153
  type: :development
107
- prerelease: false
108
- version_requirements: *84628590
109
- - !ruby/object:Gem::Dependency
154
+ version_requirements: *id008
155
+ - !ruby/object:Gem::Dependency
110
156
  name: rspec-core
111
- requirement: &84628340 !ruby/object:Gem::Requirement
157
+ prerelease: false
158
+ requirement: &id009 !ruby/object:Gem::Requirement
112
159
  none: false
113
- requirements:
114
- - - ! '>='
115
- - !ruby/object:Gem::Version
116
- version: '0'
160
+ requirements:
161
+ - - ">="
162
+ - !ruby/object:Gem::Version
163
+ hash: 3
164
+ segments:
165
+ - 0
166
+ version: "0"
117
167
  type: :development
118
- prerelease: false
119
- version_requirements: *84628340
120
- - !ruby/object:Gem::Dependency
168
+ version_requirements: *id009
169
+ - !ruby/object:Gem::Dependency
121
170
  name: rake
122
- requirement: &84628070 !ruby/object:Gem::Requirement
171
+ prerelease: false
172
+ requirement: &id010 !ruby/object:Gem::Requirement
123
173
  none: false
124
- requirements:
125
- - - =
126
- - !ruby/object:Gem::Version
174
+ requirements:
175
+ - - "="
176
+ - !ruby/object:Gem::Version
177
+ hash: 49
178
+ segments:
179
+ - 0
180
+ - 8
181
+ - 7
127
182
  version: 0.8.7
128
183
  type: :development
129
- prerelease: false
130
- version_requirements: *84628070
131
- - !ruby/object:Gem::Dependency
184
+ version_requirements: *id010
185
+ - !ruby/object:Gem::Dependency
132
186
  name: sqlite3
133
- requirement: &84627790 !ruby/object:Gem::Requirement
187
+ prerelease: false
188
+ requirement: &id011 !ruby/object:Gem::Requirement
134
189
  none: false
135
- requirements:
190
+ requirements:
136
191
  - - ~>
137
- - !ruby/object:Gem::Version
192
+ - !ruby/object:Gem::Version
193
+ hash: 25
194
+ segments:
195
+ - 1
196
+ - 3
197
+ - 1
138
198
  version: 1.3.1
139
199
  type: :development
140
- prerelease: false
141
- version_requirements: *84627790
142
- - !ruby/object:Gem::Dependency
200
+ version_requirements: *id011
201
+ - !ruby/object:Gem::Dependency
143
202
  name: net-ldap
144
- requirement: &84627520 !ruby/object:Gem::Requirement
203
+ prerelease: false
204
+ requirement: &id012 !ruby/object:Gem::Requirement
145
205
  none: false
146
- requirements:
206
+ requirements:
147
207
  - - ~>
148
- - !ruby/object:Gem::Version
208
+ - !ruby/object:Gem::Version
209
+ hash: 25
210
+ segments:
211
+ - 0
212
+ - 1
213
+ - 1
149
214
  version: 0.1.1
150
215
  type: :development
151
- prerelease: false
152
- version_requirements: *84627520
153
- - !ruby/object:Gem::Dependency
216
+ version_requirements: *id012
217
+ - !ruby/object:Gem::Dependency
154
218
  name: activeresource
155
- requirement: &84627280 !ruby/object:Gem::Requirement
219
+ prerelease: false
220
+ requirement: &id013 !ruby/object:Gem::Requirement
156
221
  none: false
157
- requirements:
158
- - - ! '>='
159
- - !ruby/object:Gem::Version
222
+ requirements:
223
+ - - ">="
224
+ - !ruby/object:Gem::Version
225
+ hash: 27
226
+ segments:
227
+ - 2
228
+ - 3
229
+ - 12
160
230
  version: 2.3.12
161
231
  - - <
162
- - !ruby/object:Gem::Version
163
- version: '3.1'
232
+ - !ruby/object:Gem::Version
233
+ hash: 5
234
+ segments:
235
+ - 3
236
+ - 1
237
+ version: "3.1"
164
238
  type: :development
165
- prerelease: false
166
- version_requirements: *84627280
167
- description: Provides single sign-on authentication for web applications using the
168
- CAS protocol.
169
- email:
239
+ version_requirements: *id013
240
+ description: Provides single sign-on authentication for web applications using the CAS protocol.
241
+ email:
170
242
  - matt@zukowski.ca
171
- executables:
243
+ executables:
172
244
  - rubycas-server
173
245
  extensions: []
174
- extra_rdoc_files:
246
+
247
+ extra_rdoc_files:
175
248
  - CHANGELOG
176
249
  - LICENSE
177
250
  - README.md
178
- files:
251
+ files:
179
252
  - CHANGELOG
180
253
  - LICENSE
181
254
  - README.md
@@ -257,16 +330,14 @@ files:
257
330
  - spec/spec.opts
258
331
  - spec/spec_helper.rb
259
332
  - spec/utils_spec.rb
260
- has_rdoc: true
261
333
  homepage: https://github.com/rubycas/rubycas-server
262
334
  licenses: []
263
- post_install_message: ! '
264
335
 
336
+ post_install_message: |+
337
+
265
338
  For more information on RubyCAS-Server, see http://code.google.com/p/rubycas-server
266
-
267
-
268
- '
269
- rdoc_options:
339
+
340
+ rdoc_options:
270
341
  - --quiet
271
342
  - --title
272
343
  - RubyCAS-Server Documentation
@@ -276,28 +347,34 @@ rdoc_options:
276
347
  - --main
277
348
  - README.md
278
349
  - --inline-source
279
- require_paths:
350
+ require_paths:
280
351
  - lib
281
- required_ruby_version: !ruby/object:Gem::Requirement
352
+ required_ruby_version: !ruby/object:Gem::Requirement
282
353
  none: false
283
- requirements:
284
- - - ! '>='
285
- - !ruby/object:Gem::Version
286
- version: '0'
287
- required_rubygems_version: !ruby/object:Gem::Requirement
354
+ requirements:
355
+ - - ">="
356
+ - !ruby/object:Gem::Version
357
+ hash: 3
358
+ segments:
359
+ - 0
360
+ version: "0"
361
+ required_rubygems_version: !ruby/object:Gem::Requirement
288
362
  none: false
289
- requirements:
290
- - - ! '>='
291
- - !ruby/object:Gem::Version
292
- version: '0'
363
+ requirements:
364
+ - - ">="
365
+ - !ruby/object:Gem::Version
366
+ hash: 3
367
+ segments:
368
+ - 0
369
+ version: "0"
293
370
  requirements: []
371
+
294
372
  rubyforge_project:
295
- rubygems_version: 1.6.2
373
+ rubygems_version: 1.8.5
296
374
  signing_key:
297
375
  specification_version: 3
298
- summary: Provides single sign-on authentication for web applications using the CAS
299
- protocol.
300
- test_files:
376
+ summary: Provides single sign-on authentication for web applications using the CAS protocol.
377
+ test_files:
301
378
  - spec/alt_config.yml
302
379
  - spec/authenticators/active_resource_spec.rb
303
380
  - spec/authenticators/ldap_spec.rb