usps-support 0.2.63 → 0.2.64

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3748994cb90c89a2e4e0f0015e82321d1921a759d72d842a5b107955f2b565b0
4
- data.tar.gz: 3fdb6b4d1dcd14d60299d0b58d8a48125ccf3d8c1318880175189a8265051748
3
+ metadata.gz: 1601da6aa9e5c242e29888573554e4954efa8f8ed5dd9f78c5b9b2275d64b0a7
4
+ data.tar.gz: 89da1c339cbc7775a2f1463fad65a6574259f3245e072d100601bdfd0fb20a40
5
5
  SHA512:
6
- metadata.gz: d311aed3d06dc4a4a0ffffb5d690616f6d17110853fdecbba22fe9f3665ec402737c1d41e951c53a961e5fa88bf556edd94fc21699648a4ab6e789afe4d05f66
7
- data.tar.gz: 95075ce81bbf0a87f4abc1c154952c515e02be8cd7d9db58116e1e4959ed5f43a3490cbce4f146b2181bd0d6971ce9dd02a3dc62a479239a7fe7f9fbbfa4ad69
6
+ metadata.gz: c816e65f0dfcdbdaa93d9641f4f9d0bcf7dc0fa623af2aca94ca62a9d757c48459fad78d3089856e8f0a4fd8c73313a1f327442f6fbde1bfa857acc6606e9275
7
+ data.tar.gz: ccf7186a3b2c8dae8a7ba59a50767d5c3d50784075f89f3c47c68fdb18f626cc51827c7d553e6aa511d0181b2283cc6da5cfa955b1faa8f3de67b554790152a8
@@ -32,7 +32,7 @@ module Usps::Support
32
32
 
33
33
  @app.call(env)
34
34
  rescue JWT::DecodeError
35
- clear_jwt(request)
35
+ request.session[:jwt] = nil
36
36
  redirect_to_login(request)
37
37
  end
38
38
 
@@ -40,7 +40,7 @@ module Usps::Support
40
40
 
41
41
  def decode_member(request)
42
42
  data = Usps::JwtAuth.decode(
43
- fetch_jwt(request),
43
+ request.session[:jwt],
44
44
  audience: [Usps::JwtAuth.config.audience],
45
45
  issuer: Regexp.union(Usps::JwtAuth.config.issuers)
46
46
  )
@@ -49,19 +49,6 @@ module Usps::Support
49
49
  nil
50
50
  end
51
51
 
52
- def fetch_jwt(request)
53
- request.session[:jwt] || request.cookie_jar[:jwt]
54
- end
55
-
56
- def clear_jwt(request)
57
- request.session[:jwt] = nil
58
- request.cookie_jar.delete(:jwt, domain: cookie_domain)
59
- end
60
-
61
- def cookie_domain
62
- Usps::JwtAuth.config.environment.production? ? '.aws.usps.org' : 'localhost'
63
- end
64
-
65
52
  def redirect_to_login(request)
66
53
  url = login_url_base
67
54
  url = "#{url}&path=#{CGI.escape(request.fullpath)}"
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Usps
4
4
  module Support
5
- VERSION = '0.2.63'
5
+ VERSION = '0.2.64'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: usps-support
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.63
4
+ version: 0.2.64
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julian Fiander
@@ -66,7 +66,7 @@ dependencies:
66
66
  version: '1'
67
67
  - - ">="
68
68
  - !ruby/object:Gem::Version
69
- version: 1.6.0
69
+ version: 1.7.0
70
70
  type: :runtime
71
71
  prerelease: false
72
72
  version_requirements: !ruby/object:Gem::Requirement
@@ -76,7 +76,7 @@ dependencies:
76
76
  version: '1'
77
77
  - - ">="
78
78
  - !ruby/object:Gem::Version
79
- version: 1.6.0
79
+ version: 1.7.0
80
80
  description: Shared support for USPS Rails applications
81
81
  email:
82
82
  - jsfiander@gmail.com