g5_authentication_client 0.5.4 → 0.5.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/.ruby-version +1 -1
- data/.travis.yml +2 -3
- data/CHANGELOG.md +5 -0
- data/lib/g5_authentication_client/auth_token_helper.rb +7 -3
- data/lib/g5_authentication_client/version.rb +1 -1
- data/spec/spec_helper.rb +1 -3
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7523b2253fa2e4cfdfe44aa19f90dd2fd723b145
|
4
|
+
data.tar.gz: 1a6c444984028cd945ea9b5655406eabf265435c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 472b9698483a47e942b7759d40fe27fb0da0b58007fbe998aa3e2235c870e27596c904ddf6a91e4bbd757131a5d0b73b4200c5428007fff61ed99a54c136c93a
|
7
|
+
data.tar.gz: 03f326c50c7bca637cb5c2173eed08e4983137aff76ec753239c79e985174a5911012a1b79c21678482c7affe0844322cd85f6e2d23cfd23cce849287d992d15
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.3.3
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -2,8 +2,12 @@ module G5AuthenticationClient::AuthTokenHelper
|
|
2
2
|
# Return response to 'yield'
|
3
3
|
# Yield response should have a 'code' method for the http status code
|
4
4
|
def do_with_username_pw_access_token
|
5
|
-
|
6
|
-
|
5
|
+
begin
|
6
|
+
response = yield cached_username_pw_access_token
|
7
|
+
rescue RestClient::ExceptionWithResponse => e
|
8
|
+
response = e.response
|
9
|
+
end
|
10
|
+
if response.code.to_i == 401
|
7
11
|
@cached_username_pw_access_token = nil
|
8
12
|
response = yield cached_username_pw_access_token
|
9
13
|
end
|
@@ -13,4 +17,4 @@ module G5AuthenticationClient::AuthTokenHelper
|
|
13
17
|
def cached_username_pw_access_token
|
14
18
|
@cached_username_pw_access_token ||= G5AuthenticationClient::Client.new.username_pw_access_token.token
|
15
19
|
end
|
16
|
-
end
|
20
|
+
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: g5_authentication_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rob Revels
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2017-09-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: modelish
|
@@ -249,7 +249,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
249
249
|
version: '0'
|
250
250
|
requirements: []
|
251
251
|
rubyforge_project: g5_authentication_client
|
252
|
-
rubygems_version: 2.
|
252
|
+
rubygems_version: 2.6.8
|
253
253
|
signing_key:
|
254
254
|
specification_version: 4
|
255
255
|
summary: Client for the G5 Auth service
|
@@ -264,4 +264,3 @@ test_files:
|
|
264
264
|
- spec/spec_helper.rb
|
265
265
|
- spec/support/module_configured_attribute.rb
|
266
266
|
- spec/support/oauth_protected_resource.rb
|
267
|
-
has_rdoc:
|