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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8b5663f2b04727e356566085797919f0afc779bc
4
- data.tar.gz: b5187b8a545bc9262e5d413c66a02f2135869ea4
3
+ metadata.gz: 543910a8200b083c4111c1e65446d69f8080ef7c
4
+ data.tar.gz: ea3a554df24491a246c37af25123ecf2b311704e
5
5
  SHA512:
6
- metadata.gz: 3e2e6b8ae412c89e5ed8784dd0bebf5992d986bb831de4b679a03693555decdd2cffbbe95eef65ad8f325f0f6abda5aac667e4d4f019c5bd501f3070df8f7f0c
7
- data.tar.gz: 045edb07ca3c06cc65b6f3b25bcf4daca695e999366ef5d4d8b9e841744814eb37fff6088f8a1d06c24cc4706e99179aa57d33f1e007fa41f991bf704a357bf9
6
+ metadata.gz: 4638a95d1d9783ca6d8bcac07d532ed5657051392fe43757296b893ab4346c7989f0a209115f2608066a7f4b4d1dd5e2bcdac9051bcffcfc66ccbdb1de4e0197
7
+ data.tar.gz: b67cfac2760b89e84f7492e641fa7804b075b2c2b79cf4043416950db6edee9f30bc931ec39191b276871768a0b4cfb99ef9cadb3897ab90669731bb5c4e8596
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.0
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.0
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-06-15 00:00:00.000000000 Z
11
+ date: 2015-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack