lhc 11.1.0 → 11.1.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
  SHA256:
3
- metadata.gz: 0e87a43808e1303e4bc441b72031c3006d101d4f9193c207fa594cafab84a587
4
- data.tar.gz: cb849adc725b31f9efed923aec3e40357362d87116603b8def485e2aca2bfe6b
3
+ metadata.gz: 236cb60f77bb99d1d14c61dd9fc9cd3c78a8bcacd734deb34b20eb72eee2c7c2
4
+ data.tar.gz: 6956f64dc5409d253b7bff60f384dba7b02aff6df7286c50a8c762011eeb8575
5
5
  SHA512:
6
- metadata.gz: 02c5069682e8764bb485254089c141751c93bf28ba414d68d4386a64bdbf5fbad3ccbe8362d61cab3725d1b14619790e822b6312e5fd1978099742dcb5e6dd06
7
- data.tar.gz: 882ac80b97b12e89088f420f1faf13cbc90c4ed89a14ba078025a42dc01449a29aaf49214d6ba2f7ffca5d29968336a23b62aabb9e679dfd343f92d6f7aab1ed
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 [0-9a-f-]+$/i
69
+ @has_bearer_header ||= request.headers['Authorization'] =~ /^Bearer .+$/i
70
70
  end
71
71
 
72
72
  def refresh_client_token_option
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LHC
4
- VERSION ||= '11.1.0'
4
+ VERSION ||= '11.1.1'
5
5
  end
@@ -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.0
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-03-16 00:00:00.000000000 Z
11
+ date: 2020-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport