lockbox_middleware 1.4.1 → 1.4.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/lockbox_middleware.rb +0 -1
- data/spec/lib/lockbox_middleware_spec.rb +20 -1
- metadata +7 -20
data/lib/lockbox_middleware.rb
CHANGED
@@ -228,6 +228,25 @@ describe 'LockBox' do
|
|
228
228
|
get @path
|
229
229
|
last_response.status.should == 200
|
230
230
|
end
|
231
|
+
|
232
|
+
it "should return 200 for a valid HMAC request from a .NET client" do
|
233
|
+
# first test w/ a Date header too, then test w/o a separate Date header
|
234
|
+
@hmac_headers['X-AuthHMAC-Request-Date'] = @hmac_headers['Date']
|
235
|
+
@hmac_headers.each_pair do |key,value|
|
236
|
+
header key, value
|
237
|
+
end
|
238
|
+
get @path
|
239
|
+
last_response.status.should == 200
|
240
|
+
end
|
241
|
+
|
242
|
+
it "should return 200 for a valid HMAC request from a .NET client with no Date header" do
|
243
|
+
@hmac_headers['X-AuthHMAC-Request-Date'] = @hmac_headers.delete('Date')
|
244
|
+
@hmac_headers.each_pair do |key,value|
|
245
|
+
header key, value
|
246
|
+
end
|
247
|
+
get @path
|
248
|
+
last_response.status.should == 200
|
249
|
+
end
|
231
250
|
|
232
251
|
it "should return 401 for an HMAC request with an invalid auth header" do
|
233
252
|
@hmac_headers['authorization'] = 'foo'
|
@@ -296,4 +315,4 @@ describe 'LockBox' do
|
|
296
315
|
|
297
316
|
end
|
298
317
|
|
299
|
-
end
|
318
|
+
end
|
metadata
CHANGED
@@ -1,24 +1,25 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lockbox_middleware
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 3
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
version: 1.4.
|
9
|
+
- 2
|
10
|
+
version: 1.4.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Chris Gill
|
14
14
|
- Nathan Woodhull
|
15
15
|
- Brian Cardarella
|
16
16
|
- Wes Morgan
|
17
|
+
- Dave Steinberg
|
17
18
|
autorequire:
|
18
19
|
bindir: bin
|
19
20
|
cert_chain: []
|
20
21
|
|
21
|
-
date: 2010-08-
|
22
|
+
date: 2010-08-26 00:00:00 -04:00
|
22
23
|
default_executable:
|
23
24
|
dependencies:
|
24
25
|
- !ruby/object:Gem::Dependency
|
@@ -35,20 +36,6 @@ dependencies:
|
|
35
36
|
version: "0"
|
36
37
|
type: :runtime
|
37
38
|
version_requirements: *id001
|
38
|
-
- !ruby/object:Gem::Dependency
|
39
|
-
name: dnclabs-auth-hmac
|
40
|
-
prerelease: false
|
41
|
-
requirement: &id002 !ruby/object:Gem::Requirement
|
42
|
-
none: false
|
43
|
-
requirements:
|
44
|
-
- - ">="
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
hash: 3
|
47
|
-
segments:
|
48
|
-
- 0
|
49
|
-
version: "0"
|
50
|
-
type: :runtime
|
51
|
-
version_requirements: *id002
|
52
39
|
description: Rack middleware for the LockBox centralized API authorization service. Brought to you by the DNC Innovation Lab.
|
53
40
|
email: innovationlab@dnc.org
|
54
41
|
executables: []
|
@@ -63,8 +50,8 @@ files:
|
|
63
50
|
- lib/lockbox_middleware.rb
|
64
51
|
- LICENSE
|
65
52
|
- README.rdoc
|
66
|
-
- spec/lib/lockbox_cache_spec.rb
|
67
53
|
- spec/lib/lockbox_middleware_spec.rb
|
54
|
+
- spec/lib/lockbox_cache_spec.rb
|
68
55
|
- spec/spec.opts
|
69
56
|
- spec/spec_helper.rb
|
70
57
|
- spec/support/helper_methods.rb
|
@@ -104,8 +91,8 @@ signing_key:
|
|
104
91
|
specification_version: 3
|
105
92
|
summary: Rack middleware for the LockBox centralized API authorization service.
|
106
93
|
test_files:
|
107
|
-
- spec/lib/lockbox_cache_spec.rb
|
108
94
|
- spec/lib/lockbox_middleware_spec.rb
|
95
|
+
- spec/lib/lockbox_cache_spec.rb
|
109
96
|
- spec/spec.opts
|
110
97
|
- spec/spec_helper.rb
|
111
98
|
- spec/support/helper_methods.rb
|