openid-token-proxy 0.1.7 → 0.1.8

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: c64cf28d8d4c3fb0774488c18ecae95c5e3abcbb
4
- data.tar.gz: 4eaa2ce104d161d27c36ff7291bf25990fb15106
3
+ metadata.gz: e5f6193dcfc4af49f08e7833b5bcc30bb0108a64
4
+ data.tar.gz: 5b9c5966abcc7eda3a1d0e1ba18da58067741e58
5
5
  SHA512:
6
- metadata.gz: d76ce92ad630b77f81c9cd1c9b993c52a886728f4bed5cfbc86fbc8ddd6d702e1597e3d77addb8ee4626f542cde7f6f5ee4bb3a99e93db78715991b1cfa7e8d6
7
- data.tar.gz: 3f658685bfc72a789dd1427c4632d396ee89cfcc82c606c2ae08d35c69a61eadb047fcccf2a99794a70a0cf5e3dc5e7b3e9335333a02be7a99046f4508c072a8
6
+ metadata.gz: 1afb7525dbe82c28c04e19f864adc189dd62afc1c67adac23d9f819251cebb8b9a8123e77f329a3ef6a34355e437bd2b062213d40355fc1d14559ba79d7bc44e
7
+ data.tar.gz: c7f09358d2ad3d9851dbddd4b05015cca6344b6be13c61fecb93c6250b2b4d02a88f5a8c44270945344637a3ec7f0197876885bcd420422bfad06c1d1749fe7f
@@ -3,4 +3,9 @@ cache: bundler
3
3
  rvm:
4
4
  - 2.0.0
5
5
  - 2.1.0
6
+ - 2.2.5
7
+ matrix:
8
+ allow_failures:
9
+ - rvm: 2.0.0
10
+ - rvm: 2.1.0
6
11
  script: bundle exec rake spec
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ### v0.1.8 - August 4, 2016
4
+
5
+ - No longer validates client/application ID.
6
+
3
7
  ### v0.1.7 - February 15, 2016
4
8
 
5
9
  - Allow passing tokens from cookies.
@@ -1,5 +1,4 @@
1
1
  require 'openid_token_proxy/token/expired'
2
- require 'openid_token_proxy/token/invalid_application'
3
2
  require 'openid_token_proxy/token/invalid_audience'
4
3
  require 'openid_token_proxy/token/invalid_issuer'
5
4
  require 'openid_token_proxy/token/malformed'
@@ -39,11 +38,6 @@ module OpenIDTokenProxy
39
38
  raise InvalidAudience unless audiences.include? assertions[:audience]
40
39
  end
41
40
 
42
- if assertions[:client_id]
43
- appid = id_token.raw_attributes['appid']
44
- raise InvalidApplication if appid && appid != assertions[:client_id]
45
- end
46
-
47
41
  if assertions[:issuer]
48
42
  issuer = id_token.iss
49
43
  raise InvalidIssuer unless issuer == assertions[:issuer]
@@ -28,8 +28,7 @@ module OpenIDTokenProxy
28
28
 
29
29
  def require_valid_token
30
30
  config = OpenIDTokenProxy.config
31
- current_token.validate! audience: config.resource,
32
- client_id: config.client_id
31
+ current_token.validate! audience: config.resource
33
32
  end
34
33
 
35
34
  def expose_token_expiry_time
@@ -1,3 +1,3 @@
1
1
  module OpenIDTokenProxy
2
- VERSION = '0.1.7'
2
+ VERSION = '0.1.8'
3
3
  end
@@ -42,14 +42,6 @@ RSpec.describe OpenIDTokenProxy::Token do
42
42
  end
43
43
  end
44
44
 
45
- context 'when application differs' do
46
- it 'raises' do
47
- expect do
48
- subject.validate! client_id: 'expected client ID'
49
- end.to raise_error OpenIDTokenProxy::Token::InvalidApplication
50
- end
51
- end
52
-
53
45
  context 'when audience differs' do
54
46
  it 'raises' do
55
47
  expect do
@@ -70,7 +62,6 @@ RSpec.describe OpenIDTokenProxy::Token do
70
62
  it 'returns true' do
71
63
  assertions = {
72
64
  audience: audience,
73
- client_id: client_id,
74
65
  issuer: issuer
75
66
  }
76
67
  expect(subject.validate! assertions).to be_truthy
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openid-token-proxy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Kurvers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-15 00:00:00.000000000 Z
11
+ date: 2016-08-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: openid_connect
@@ -226,7 +226,6 @@ files:
226
226
  - lib/openid_token_proxy/token.rb
227
227
  - lib/openid_token_proxy/token/authentication.rb
228
228
  - lib/openid_token_proxy/token/expired.rb
229
- - lib/openid_token_proxy/token/invalid_application.rb
230
229
  - lib/openid_token_proxy/token/invalid_audience.rb
231
230
  - lib/openid_token_proxy/token/invalid_issuer.rb
232
231
  - lib/openid_token_proxy/token/malformed.rb
@@ -311,7 +310,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
311
310
  version: '0'
312
311
  requirements: []
313
312
  rubyforge_project:
314
- rubygems_version: 2.4.5.1
313
+ rubygems_version: 2.2.2
315
314
  signing_key:
316
315
  specification_version: 4
317
316
  summary: Retrieves and refreshes OpenID tokens on behalf of a user
@@ -1,12 +0,0 @@
1
- module OpenIDTokenProxy
2
- class Token
3
-
4
- # Raised when a token's application did not match
5
- class InvalidApplication < Error
6
- def initialize
7
- super 'Token is not intended for this application.'
8
- end
9
- end
10
-
11
- end
12
- end