rack-oauth2 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/rack/oauth2/access_token.rb +2 -0
- data/spec/rack/oauth2/access_token_spec.rb +11 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 543910a8200b083c4111c1e65446d69f8080ef7c
|
4
|
+
data.tar.gz: ea3a554df24491a246c37af25123ecf2b311704e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4638a95d1d9783ca6d8bcac07d532ed5657051392fe43757296b893ab4346c7989f0a209115f2608066a7f4b4d1dd5e2bcdac9051bcffcfc66ccbdb1de4e0197
|
7
|
+
data.tar.gz: b67cfac2760b89e84f7492e641fa7804b075b2c2b79cf4043416950db6edee9f30bc931ec39191b276871768a0b4cfb99ef9cadb3897ab90669731bb5c4e8596
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.2.
|
1
|
+
1.2.1
|
@@ -4,6 +4,7 @@ module Rack
|
|
4
4
|
include AttrRequired, AttrOptional
|
5
5
|
attr_required :access_token, :token_type, :httpclient
|
6
6
|
attr_optional :refresh_token, :expires_in, :scope
|
7
|
+
attr_accessor :raw_attributes
|
7
8
|
delegate :get, :post, :put, :delete, to: :httpclient
|
8
9
|
|
9
10
|
alias_method :to_s, :access_token
|
@@ -12,6 +13,7 @@ module Rack
|
|
12
13
|
(required_attributes + optional_attributes).each do |key|
|
13
14
|
self.send :"#{key}=", attributes[key]
|
14
15
|
end
|
16
|
+
@raw_attributes = attributes
|
15
17
|
@token_type = self.class.name.demodulize.underscore.to_sym
|
16
18
|
@httpclient = Rack::OAuth2.http_client("#{self.class} (#{VERSION})") do |config|
|
17
19
|
config.request_filter << Authenticator.new(self)
|
@@ -65,5 +65,16 @@ describe Rack::OAuth2::AccessToken do
|
|
65
65
|
end
|
66
66
|
end
|
67
67
|
end
|
68
|
+
|
69
|
+
context 'when extension params given' do
|
70
|
+
subject do
|
71
|
+
Rack::OAuth2::AccessToken::Bearer.new(
|
72
|
+
access_token: 'access_token',
|
73
|
+
ex_key: :ex_value
|
74
|
+
)
|
75
|
+
end
|
76
|
+
|
77
|
+
its(:raw_attributes) { should include :ex_key }
|
78
|
+
end
|
68
79
|
end
|
69
80
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-oauth2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- nov matake
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-07-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|