usps-support 0.2.62 → 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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1601da6aa9e5c242e29888573554e4954efa8f8ed5dd9f78c5b9b2275d64b0a7
|
|
4
|
+
data.tar.gz: 89da1c339cbc7775a2f1463fad65a6574259f3245e072d100601bdfd0fb20a40
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c816e65f0dfcdbdaa93d9641f4f9d0bcf7dc0fa623af2aca94ca62a9d757c48459fad78d3089856e8f0a4fd8c73313a1f327442f6fbde1bfa857acc6606e9275
|
|
7
|
+
data.tar.gz: ccf7186a3b2c8dae8a7ba59a50767d5c3d50784075f89f3c47c68fdb18f626cc51827c7d553e6aa511d0181b2283cc6da5cfa955b1faa8f3de67b554790152a8
|
|
@@ -15,7 +15,7 @@ module Usps::Support
|
|
|
15
15
|
skip_before_action :authenticate_user_from_jwt!, raise: false
|
|
16
16
|
skip_after_action :verify_authorized, raise: false
|
|
17
17
|
|
|
18
|
-
# Prepended
|
|
18
|
+
# Prepended, so a refused request doesn't reach the inherited filters, which look up the member.
|
|
19
19
|
prepend_before_action :require_trusted_origin
|
|
20
20
|
|
|
21
21
|
def create
|
|
@@ -32,7 +32,7 @@ module Usps::Support
|
|
|
32
32
|
|
|
33
33
|
@app.call(env)
|
|
34
34
|
rescue JWT::DecodeError
|
|
35
|
-
|
|
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
|
-
|
|
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)}"
|
data/lib/usps/support/version.rb
CHANGED
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.
|
|
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.
|
|
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.
|
|
79
|
+
version: 1.7.0
|
|
80
80
|
description: Shared support for USPS Rails applications
|
|
81
81
|
email:
|
|
82
82
|
- jsfiander@gmail.com
|