rack-oauth2 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.rdoc +0 -1
- data/VERSION +1 -1
- data/lib/rack/oauth2/access_token/mac.rb +3 -1
- data/lib/rack/oauth2/server/authorize.rb +2 -2
- data/rack-oauth2.gemspec +0 -1
- data/spec/rack/oauth2/server/authorize_spec.rb +5 -5
- metadata +26 -61
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: e5c56e1238f42b9c49a7a8073a4333264b828fdf
|
4
|
+
data.tar.gz: f14226ecedf79f79605a1f5b7b03d58d07596e7f
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: a7d5529c92f47104946401a8011d71e27d51bd1ce5ee36fd245f430d08c6dc2929cf488c7aecb63156d550ea1b8ad598ba7665714c11b644cf192450e293c7b7
|
7
|
+
data.tar.gz: b852c38d793f4b77f92c46a38868292fb34c9beebfcba3530d8dce4bc37b93c8b474d4c174d789b317e47d372c0d2eb86462dbbe6fcd42a26fb45b1d0cc7f304
|
data/README.rdoc
CHANGED
@@ -4,7 +4,6 @@ OAuth 2.0 Server & Client Library.
|
|
4
4
|
Both Bearer and MAC token type are supported.
|
5
5
|
|
6
6
|
{<img src="https://secure.travis-ci.org/nov/rack-oauth2.png" />}[http://travis-ci.org/nov/rack-oauth2]
|
7
|
-
{<img src="http://www.pledgie.com/campaigns/19044.png?skin_name=chrome" />}[http://www.pledgie.com/campaigns/19044]
|
8
7
|
|
9
8
|
The OAuth 2.0 Authorization Framework (RFC 6749)
|
10
9
|
http://www.rfc-editor.org/rfc/rfc6749.txt
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.4
|
@@ -20,8 +20,10 @@ module Rack
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def verify!(request)
|
23
|
-
body = request.body.read
|
24
23
|
if self.ext_verifier.present?
|
24
|
+
body = request.body.read
|
25
|
+
request.body.rewind # for future use
|
26
|
+
|
25
27
|
self.ext_verifier.new(
|
26
28
|
:raw_body => body,
|
27
29
|
:algorithm => self.mac_algorithm
|
@@ -58,12 +58,12 @@ module Rack
|
|
58
58
|
if verified
|
59
59
|
redirect_uri
|
60
60
|
else
|
61
|
-
bad_request!
|
61
|
+
bad_request!
|
62
62
|
end
|
63
63
|
elsif pre_registered.present? && Array(pre_registered).size == 1 && !allow_partial_match
|
64
64
|
Array(pre_registered).first
|
65
65
|
else
|
66
|
-
bad_request!
|
66
|
+
bad_request!
|
67
67
|
end
|
68
68
|
self.verified_redirect_uri.to_s
|
69
69
|
end
|
data/rack-oauth2.gemspec
CHANGED
@@ -17,7 +17,6 @@ Gem::Specification.new do |s|
|
|
17
17
|
s.add_runtime_dependency "multi_json", ">= 1.3.6"
|
18
18
|
s.add_runtime_dependency "httpclient", ">= 2.2.0.2"
|
19
19
|
s.add_runtime_dependency "activesupport", ">= 2.3"
|
20
|
-
s.add_runtime_dependency "i18n"
|
21
20
|
s.add_runtime_dependency "attr_required", ">= 0.0.5"
|
22
21
|
s.add_development_dependency "rake", ">= 0.8"
|
23
22
|
if RUBY_VERSION >= '1.9'
|
@@ -68,7 +68,7 @@ describe Rack::OAuth2::Server::Authorize do
|
|
68
68
|
it do
|
69
69
|
expect do
|
70
70
|
request.verify_redirect_uri!(pre_registered)
|
71
|
-
end.to raise_error
|
71
|
+
end.to raise_error bad_request
|
72
72
|
end
|
73
73
|
end
|
74
74
|
end
|
@@ -93,7 +93,7 @@ describe Rack::OAuth2::Server::Authorize do
|
|
93
93
|
it do
|
94
94
|
expect do
|
95
95
|
request.verify_redirect_uri!(pre_registered)
|
96
|
-
end.to raise_error
|
96
|
+
end.to raise_error bad_request
|
97
97
|
end
|
98
98
|
end
|
99
99
|
end
|
@@ -103,7 +103,7 @@ describe Rack::OAuth2::Server::Authorize do
|
|
103
103
|
it do
|
104
104
|
expect do
|
105
105
|
request.verify_redirect_uri!(pre_registered)
|
106
|
-
end.to raise_error
|
106
|
+
end.to raise_error bad_request
|
107
107
|
end
|
108
108
|
end
|
109
109
|
|
@@ -125,7 +125,7 @@ describe Rack::OAuth2::Server::Authorize do
|
|
125
125
|
it do
|
126
126
|
expect do
|
127
127
|
request.verify_redirect_uri!(pre_registered, :allow_partial_match)
|
128
|
-
end.to raise_error
|
128
|
+
end.to raise_error bad_request
|
129
129
|
end
|
130
130
|
end
|
131
131
|
|
@@ -141,7 +141,7 @@ describe Rack::OAuth2::Server::Authorize do
|
|
141
141
|
it do
|
142
142
|
expect do
|
143
143
|
request.verify_redirect_uri!(pre_registered)
|
144
|
-
end.to raise_error
|
144
|
+
end.to raise_error bad_request
|
145
145
|
end
|
146
146
|
end
|
147
147
|
end
|
metadata
CHANGED
@@ -1,174 +1,139 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-oauth2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
5
|
-
prerelease:
|
4
|
+
version: 1.0.4
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- nov matake
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-
|
11
|
+
date: 2013-04-15 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: rack
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '1.1'
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - '>='
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '1.1'
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: multi_json
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - '>='
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: 1.3.6
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- -
|
38
|
+
- - '>='
|
44
39
|
- !ruby/object:Gem::Version
|
45
40
|
version: 1.3.6
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: httpclient
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- -
|
45
|
+
- - '>='
|
52
46
|
- !ruby/object:Gem::Version
|
53
47
|
version: 2.2.0.2
|
54
48
|
type: :runtime
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
|
-
- -
|
52
|
+
- - '>='
|
60
53
|
- !ruby/object:Gem::Version
|
61
54
|
version: 2.2.0.2
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: activesupport
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
|
-
- -
|
59
|
+
- - '>='
|
68
60
|
- !ruby/object:Gem::Version
|
69
61
|
version: '2.3'
|
70
62
|
type: :runtime
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
|
-
- -
|
66
|
+
- - '>='
|
76
67
|
- !ruby/object:Gem::Version
|
77
68
|
version: '2.3'
|
78
|
-
- !ruby/object:Gem::Dependency
|
79
|
-
name: i18n
|
80
|
-
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
|
-
requirements:
|
83
|
-
- - ! '>='
|
84
|
-
- !ruby/object:Gem::Version
|
85
|
-
version: '0'
|
86
|
-
type: :runtime
|
87
|
-
prerelease: false
|
88
|
-
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
|
-
requirements:
|
91
|
-
- - ! '>='
|
92
|
-
- !ruby/object:Gem::Version
|
93
|
-
version: '0'
|
94
69
|
- !ruby/object:Gem::Dependency
|
95
70
|
name: attr_required
|
96
71
|
requirement: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
72
|
requirements:
|
99
|
-
- -
|
73
|
+
- - '>='
|
100
74
|
- !ruby/object:Gem::Version
|
101
75
|
version: 0.0.5
|
102
76
|
type: :runtime
|
103
77
|
prerelease: false
|
104
78
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
79
|
requirements:
|
107
|
-
- -
|
80
|
+
- - '>='
|
108
81
|
- !ruby/object:Gem::Version
|
109
82
|
version: 0.0.5
|
110
83
|
- !ruby/object:Gem::Dependency
|
111
84
|
name: rake
|
112
85
|
requirement: !ruby/object:Gem::Requirement
|
113
|
-
none: false
|
114
86
|
requirements:
|
115
|
-
- -
|
87
|
+
- - '>='
|
116
88
|
- !ruby/object:Gem::Version
|
117
89
|
version: '0.8'
|
118
90
|
type: :development
|
119
91
|
prerelease: false
|
120
92
|
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
none: false
|
122
93
|
requirements:
|
123
|
-
- -
|
94
|
+
- - '>='
|
124
95
|
- !ruby/object:Gem::Version
|
125
96
|
version: '0.8'
|
126
97
|
- !ruby/object:Gem::Dependency
|
127
98
|
name: cover_me
|
128
99
|
requirement: !ruby/object:Gem::Requirement
|
129
|
-
none: false
|
130
100
|
requirements:
|
131
|
-
- -
|
101
|
+
- - '>='
|
132
102
|
- !ruby/object:Gem::Version
|
133
103
|
version: 1.2.0
|
134
104
|
type: :development
|
135
105
|
prerelease: false
|
136
106
|
version_requirements: !ruby/object:Gem::Requirement
|
137
|
-
none: false
|
138
107
|
requirements:
|
139
|
-
- -
|
108
|
+
- - '>='
|
140
109
|
- !ruby/object:Gem::Version
|
141
110
|
version: 1.2.0
|
142
111
|
- !ruby/object:Gem::Dependency
|
143
112
|
name: rspec
|
144
113
|
requirement: !ruby/object:Gem::Requirement
|
145
|
-
none: false
|
146
114
|
requirements:
|
147
|
-
- -
|
115
|
+
- - '>='
|
148
116
|
- !ruby/object:Gem::Version
|
149
117
|
version: '2'
|
150
118
|
type: :development
|
151
119
|
prerelease: false
|
152
120
|
version_requirements: !ruby/object:Gem::Requirement
|
153
|
-
none: false
|
154
121
|
requirements:
|
155
|
-
- -
|
122
|
+
- - '>='
|
156
123
|
- !ruby/object:Gem::Version
|
157
124
|
version: '2'
|
158
125
|
- !ruby/object:Gem::Dependency
|
159
126
|
name: webmock
|
160
127
|
requirement: !ruby/object:Gem::Requirement
|
161
|
-
none: false
|
162
128
|
requirements:
|
163
|
-
- -
|
129
|
+
- - '>='
|
164
130
|
- !ruby/object:Gem::Version
|
165
131
|
version: 1.6.2
|
166
132
|
type: :development
|
167
133
|
prerelease: false
|
168
134
|
version_requirements: !ruby/object:Gem::Requirement
|
169
|
-
none: false
|
170
135
|
requirements:
|
171
|
-
- -
|
136
|
+
- - '>='
|
172
137
|
- !ruby/object:Gem::Version
|
173
138
|
version: 1.6.2
|
174
139
|
description: OAuth 2.0 Server & Client Library. Both Bearer and MAC token type are
|
@@ -285,28 +250,27 @@ files:
|
|
285
250
|
- spec/spec_helper.rb
|
286
251
|
homepage: http://github.com/nov/rack-oauth2
|
287
252
|
licenses: []
|
253
|
+
metadata: {}
|
288
254
|
post_install_message:
|
289
255
|
rdoc_options:
|
290
256
|
- --charset=UTF-8
|
291
257
|
require_paths:
|
292
258
|
- lib
|
293
259
|
required_ruby_version: !ruby/object:Gem::Requirement
|
294
|
-
none: false
|
295
260
|
requirements:
|
296
|
-
- -
|
261
|
+
- - '>='
|
297
262
|
- !ruby/object:Gem::Version
|
298
263
|
version: '0'
|
299
264
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
300
|
-
none: false
|
301
265
|
requirements:
|
302
|
-
- -
|
266
|
+
- - '>='
|
303
267
|
- !ruby/object:Gem::Version
|
304
268
|
version: 1.3.6
|
305
269
|
requirements: []
|
306
270
|
rubyforge_project:
|
307
|
-
rubygems_version:
|
271
|
+
rubygems_version: 2.0.0
|
308
272
|
signing_key:
|
309
|
-
specification_version:
|
273
|
+
specification_version: 4
|
310
274
|
summary: OAuth 2.0 Server & Client Library - Both Bearer and MAC token type are supported
|
311
275
|
test_files:
|
312
276
|
- spec/helpers/time.rb
|
@@ -357,3 +321,4 @@ test_files:
|
|
357
321
|
- spec/rack/oauth2/server/token_spec.rb
|
358
322
|
- spec/rack/oauth2/util_spec.rb
|
359
323
|
- spec/spec_helper.rb
|
324
|
+
has_rdoc:
|