rack-oauth2 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile.lock +17 -17
- data/README.rdoc +8 -5
- data/VERSION +1 -1
- data/lib/rack/oauth2/access_token/legacy.rb +4 -1
- data/lib/rack/oauth2/debugger/request_filter.rb +10 -2
- data/lib/rack/oauth2/server/resource/bearer.rb +1 -1
- data/lib/rack/oauth2/server/resource/mac.rb +1 -1
- data/spec/mock_response/tokens/legacy.txt +1 -1
- data/spec/rack/oauth2/debugger/request_filter_spec.rb +12 -8
- metadata +5 -2
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rack-oauth2 (0.
|
4
|
+
rack-oauth2 (1.0.1)
|
5
5
|
activesupport (>= 2.3)
|
6
6
|
attr_required (>= 0.0.5)
|
7
7
|
httpclient (>= 2.2.0.2)
|
@@ -12,7 +12,7 @@ PATH
|
|
12
12
|
GEM
|
13
13
|
remote: http://rubygems.org/
|
14
14
|
specs:
|
15
|
-
activesupport (3.2.
|
15
|
+
activesupport (3.2.11)
|
16
16
|
i18n (~> 0.6)
|
17
17
|
multi_json (~> 1.0)
|
18
18
|
addressable (2.3.2)
|
@@ -23,25 +23,25 @@ GEM
|
|
23
23
|
cover_me (1.2.0)
|
24
24
|
configatron
|
25
25
|
hashie
|
26
|
-
crack (0.3.
|
26
|
+
crack (0.3.2)
|
27
27
|
diff-lcs (1.1.3)
|
28
28
|
hashie (1.2.0)
|
29
|
-
httpclient (2.2
|
30
|
-
i18n (0.6.
|
31
|
-
jruby-openssl (0.
|
29
|
+
httpclient (2.3.2)
|
30
|
+
i18n (0.6.1)
|
31
|
+
jruby-openssl (0.8.2)
|
32
32
|
bouncy-castle-java (>= 1.5.0146.1)
|
33
|
-
multi_json (1.
|
34
|
-
rack (1.
|
35
|
-
rake (0.
|
36
|
-
rspec (2.
|
37
|
-
rspec-core (~> 2.
|
38
|
-
rspec-expectations (~> 2.
|
39
|
-
rspec-mocks (~> 2.
|
40
|
-
rspec-core (2.
|
41
|
-
rspec-expectations (2.
|
33
|
+
multi_json (1.5.0)
|
34
|
+
rack (1.5.1)
|
35
|
+
rake (10.0.3)
|
36
|
+
rspec (2.12.0)
|
37
|
+
rspec-core (~> 2.12.0)
|
38
|
+
rspec-expectations (~> 2.12.0)
|
39
|
+
rspec-mocks (~> 2.12.0)
|
40
|
+
rspec-core (2.12.2)
|
41
|
+
rspec-expectations (2.12.1)
|
42
42
|
diff-lcs (~> 1.1.3)
|
43
|
-
rspec-mocks (2.
|
44
|
-
webmock (1.
|
43
|
+
rspec-mocks (2.12.1)
|
44
|
+
webmock (1.9.0)
|
45
45
|
addressable (>= 2.2.7)
|
46
46
|
crack (>= 0.1.7)
|
47
47
|
yamler (0.1.0)
|
data/README.rdoc
CHANGED
@@ -3,14 +3,17 @@
|
|
3
3
|
OAuth 2.0 Server & Client Library.
|
4
4
|
Both Bearer and MAC token type are supported.
|
5
5
|
|
6
|
-
|
7
|
-
http://
|
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
8
|
|
9
|
-
The OAuth 2.0
|
9
|
+
The OAuth 2.0 Authorization Framework (RFC 6749)
|
10
|
+
http://www.rfc-editor.org/rfc/rfc6749.txt
|
11
|
+
|
12
|
+
The OAuth 2.0 Authorization Framework: Bearer Token Usage (RFC 6750)
|
10
13
|
http://tools.ietf.org/html/draft-ietf-oauth-v2-bearer-06
|
11
14
|
|
12
15
|
HTTP Authentication: MAC Access Authentication (draft 01)
|
13
|
-
http://
|
16
|
+
http://tools.ietf.org/html/draft-ietf-oauth-v2-http-mac-01
|
14
17
|
|
15
18
|
== Installation
|
16
19
|
|
@@ -62,7 +65,7 @@ Resource Request (request both for resource owner resource and for client resour
|
|
62
65
|
https://gist.github.com/933885
|
63
66
|
|
64
67
|
== Note on Patches/Pull Requests
|
65
|
-
|
68
|
+
|
66
69
|
* Fork the project.
|
67
70
|
* Make your feature addition or bug fix.
|
68
71
|
* Add tests for it. This is important so I don't break it in a
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.1
|
@@ -6,7 +6,7 @@ module Rack
|
|
6
6
|
# request:: HTTP::Message
|
7
7
|
def filter_request(request)
|
8
8
|
started = "======= [Rack::OAuth2] HTTP REQUEST STARTED ======="
|
9
|
-
|
9
|
+
log started, request.dump
|
10
10
|
end
|
11
11
|
|
12
12
|
# Callback called in HTTPClient (after received a response)
|
@@ -14,7 +14,15 @@ module Rack
|
|
14
14
|
# response:: HTTP::Message
|
15
15
|
def filter_response(request, response)
|
16
16
|
finished = "======= [Rack::OAuth2] HTTP REQUEST FINISHED ======="
|
17
|
-
|
17
|
+
log '-' * 50, response.dump, finished
|
18
|
+
end
|
19
|
+
|
20
|
+
private
|
21
|
+
|
22
|
+
def log(*outputs)
|
23
|
+
outputs.each do |output|
|
24
|
+
OAuth2.logger.info output
|
25
|
+
end
|
18
26
|
end
|
19
27
|
end
|
20
28
|
end
|
@@ -1 +1 @@
|
|
1
|
-
access_token=access_token&
|
1
|
+
access_token=access_token&expires=3600
|
@@ -8,21 +8,25 @@ describe Rack::OAuth2::Debugger::RequestFilter do
|
|
8
8
|
|
9
9
|
describe '#filter_request' do
|
10
10
|
it 'should log request' do
|
11
|
-
|
12
|
-
"======= [Rack::OAuth2] HTTP REQUEST STARTED
|
11
|
+
[
|
12
|
+
"======= [Rack::OAuth2] HTTP REQUEST STARTED =======",
|
13
13
|
request.dump
|
14
|
-
|
14
|
+
].each do |output|
|
15
|
+
Rack::OAuth2.logger.should_receive(:info).with output
|
16
|
+
end
|
15
17
|
request_filter.filter_request(request)
|
16
18
|
end
|
17
19
|
end
|
18
20
|
|
19
21
|
describe '#filter_response' do
|
20
22
|
it 'should log response' do
|
21
|
-
|
22
|
-
"
|
23
|
-
response.dump
|
24
|
-
"
|
25
|
-
|
23
|
+
[
|
24
|
+
"--------------------------------------------------",
|
25
|
+
response.dump,
|
26
|
+
"======= [Rack::OAuth2] HTTP REQUEST FINISHED ======="
|
27
|
+
].each do |output|
|
28
|
+
Rack::OAuth2.logger.should_receive(:info).with output
|
29
|
+
end
|
26
30
|
request_filter.filter_response(request, response)
|
27
31
|
end
|
28
32
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-oauth2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-02-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rack
|
@@ -296,6 +296,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
296
296
|
- - ! '>='
|
297
297
|
- !ruby/object:Gem::Version
|
298
298
|
version: '0'
|
299
|
+
segments:
|
300
|
+
- 0
|
301
|
+
hash: 1898578761038848884
|
299
302
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
300
303
|
none: false
|
301
304
|
requirements:
|