lhc 11.1.0 → 11.1.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.
- checksums.yaml +4 -4
- data/lib/lhc/interceptors/auth.rb +1 -1
- data/lib/lhc/version.rb +1 -1
- data/spec/interceptors/auth/reauthentication_spec.rb +10 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 236cb60f77bb99d1d14c61dd9fc9cd3c78a8bcacd734deb34b20eb72eee2c7c2
|
|
4
|
+
data.tar.gz: 6956f64dc5409d253b7bff60f384dba7b02aff6df7286c50a8c762011eeb8575
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '0559059bd1594c8cf6efd9ea3805318af91835e20e87e200176f3eb2c74b7fb83e40f682725a7b4043d443e8950debf9edf1016cc40b41518a8f608a22e10fae'
|
|
7
|
+
data.tar.gz: 93846206064d7c3547814aa6e8f4aecd857dc59b139de09c0b921937709c6088be9e1fd8b0c0e8ab5218f6fa3a6ab85bd86ba80cc3bddac36affc449c6f13456
|
|
@@ -66,7 +66,7 @@ class LHC::Auth < LHC::Interceptor
|
|
|
66
66
|
end
|
|
67
67
|
|
|
68
68
|
def bearer_header_present?
|
|
69
|
-
@has_bearer_header ||= request.headers['Authorization'] =~ /^Bearer
|
|
69
|
+
@has_bearer_header ||= request.headers['Authorization'] =~ /^Bearer .+$/i
|
|
70
70
|
end
|
|
71
71
|
|
|
72
72
|
def refresh_client_token_option
|
data/lib/lhc/version.rb
CHANGED
|
@@ -31,4 +31,14 @@ describe LHC::Auth do
|
|
|
31
31
|
LHC.config.endpoint(:local, 'http://local.ch', auth: options.merge(reauthenticated: true))
|
|
32
32
|
expect { LHC.get(:local) }.to raise_error(LHC::Unauthorized)
|
|
33
33
|
end
|
|
34
|
+
|
|
35
|
+
context 'token format' do
|
|
36
|
+
let(:initial_token) { 'BAsZ-98-ZZZ' }
|
|
37
|
+
|
|
38
|
+
it 'refreshes tokens with various formats' do
|
|
39
|
+
LHC.config.endpoint(:local, 'http://local.ch', auth: options)
|
|
40
|
+
LHC.get(:local)
|
|
41
|
+
expect(auth_suceeding_after_recovery).to have_been_made.once
|
|
42
|
+
end
|
|
43
|
+
end
|
|
34
44
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: lhc
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 11.1.
|
|
4
|
+
version: 11.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- https://github.com/local-ch/lhc/contributors
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-
|
|
11
|
+
date: 2020-04-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|