openid-token-proxy 0.1.4 → 0.1.5
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/openid_token_proxy/config.rb +10 -1
- data/lib/openid_token_proxy/version.rb +1 -1
- data/spec/lib/openid_token_proxy/config_spec.rb +20 -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: 1852cecc6e9e7277ab992bd28fd2404ab689ccef
|
4
|
+
data.tar.gz: 09c707163098b24846daf45a01615e4fd4818f49
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71b4178d73d08c1189ace2394c5f8ab31515f13be91fef9abf04d068e371395b8136274d550c47811a472addef00aa005db709ae7dde2c36cfd647e8c5b4a474
|
7
|
+
data.tar.gz: 7d6be97f388a8d8cf82c049ba4ffd5e5b15853433c14ad54b182c2f4814b854b4c649cf57ba96f7b3368469ea607a029f0b6f973546fdcb9b3ccb20fa80f34c8
|
data/CHANGELOG.md
CHANGED
@@ -4,8 +4,12 @@ module OpenIDTokenProxy
|
|
4
4
|
class Config
|
5
5
|
attr_accessor :client_id, :client_secret, :issuer
|
6
6
|
attr_accessor :domain_hint, :prompt, :redirect_uri, :resource
|
7
|
+
|
7
8
|
attr_accessor :authorization_uri
|
8
|
-
|
9
|
+
|
10
|
+
attr_accessor :authorization_endpoint, :token_endpoint,
|
11
|
+
:userinfo_endpoint, :end_session_endpoint
|
12
|
+
|
9
13
|
attr_accessor :token_acquirement_hook
|
10
14
|
attr_accessor :public_keys
|
11
15
|
|
@@ -24,6 +28,7 @@ module OpenIDTokenProxy
|
|
24
28
|
@authorization_endpoint = ENV['OPENID_AUTHORIZATION_ENDPOINT']
|
25
29
|
@token_endpoint = ENV['OPENID_TOKEN_ENDPOINT']
|
26
30
|
@userinfo_endpoint = ENV['OPENID_USERINFO_ENDPOINT']
|
31
|
+
@end_session_endpoint = ENV['OPENID_END_SESSION_ENDPOINT']
|
27
32
|
|
28
33
|
@token_acquirement_hook = proc { }
|
29
34
|
|
@@ -49,6 +54,10 @@ module OpenIDTokenProxy
|
|
49
54
|
@userinfo_endpoint || provider_config.userinfo_endpoint
|
50
55
|
end
|
51
56
|
|
57
|
+
def end_session_endpoint
|
58
|
+
@end_session_endpoint || provider_config.raw['end_session_endpoint']
|
59
|
+
end
|
60
|
+
|
52
61
|
def public_keys
|
53
62
|
@public_keys ||= provider_config.public_keys
|
54
63
|
end
|
@@ -209,6 +209,26 @@ RSpec.describe OpenIDTokenProxy::Config do
|
|
209
209
|
end
|
210
210
|
end
|
211
211
|
|
212
|
+
describe '#end_session_endpoint' do
|
213
|
+
it 'obtains its default from environment' do
|
214
|
+
stub_env('OPENID_END_SESSION_ENDPOINT', 'from env')
|
215
|
+
expect(subject.end_session_endpoint).to eq 'from env'
|
216
|
+
end
|
217
|
+
|
218
|
+
it 'may be set explicitly' do
|
219
|
+
subject.end_session_endpoint = 'overridden'
|
220
|
+
expect(subject.end_session_endpoint).to eq 'overridden'
|
221
|
+
end
|
222
|
+
|
223
|
+
context 'when not set' do
|
224
|
+
it 'defaults to endpoint from provider config' do
|
225
|
+
stub_env('OPENID_END_SESSION_ENDPOINT')
|
226
|
+
ep = with_valid_issuer.end_session_endpoint
|
227
|
+
expect(ep).to eq 'https://login.windows.net/common/oauth2/logout'
|
228
|
+
end
|
229
|
+
end
|
230
|
+
end
|
231
|
+
|
212
232
|
describe '#public_keys' do
|
213
233
|
it 'may be set explicitly' do
|
214
234
|
subject.public_keys = []
|
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.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Kurvers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: openid_connect
|