usps-jwt_auth 1.2.2 → 1.2.3
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/Gemfile.lock +1 -1
- data/lib/usps/jwt_auth/concern.rb +7 -1
- data/lib/usps/jwt_auth/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 55690055320ed2dfe5ace756f990bedd8769a5003750baa7ab13828330a78052
|
|
4
|
+
data.tar.gz: 9bbadbdcb087a8645b2b057a01020589aacbf0d6a5d498fcc907f30f3e667150
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 57e395c8ee636d9ac8b7d1709927fab0506f4b20acf146925e22829da835bcf943c6151e5732c9b9c6271f348355e8daf7f0c346b31c8bfb9114c93591f03620
|
|
7
|
+
data.tar.gz: f7bdfdb5a52b589639f81481e9bb2bf6906f94b037b0865bb22e91a94db10bd91c0c049922f9243f87c2faa49599e08b97a3686a2e2a74921ef2c98166a2fb23
|
data/Gemfile.lock
CHANGED
|
@@ -84,9 +84,15 @@ module Usps
|
|
|
84
84
|
@set_new_jwt = true
|
|
85
85
|
end
|
|
86
86
|
|
|
87
|
+
# Back to where the login began, with the query it began with. The query rides through the login
|
|
88
|
+
# as a single `query_string` parameter, and is unpacked here rather than handed on still packed.
|
|
89
|
+
# It is re-encoded rather than passed through as received, so the redirect stays well-formed
|
|
90
|
+
# whatever arrives.
|
|
87
91
|
def redirect_to_path!
|
|
88
92
|
path = params[:path] || root_path
|
|
89
|
-
|
|
93
|
+
pairs = URI.decode_www_form(params[:query_string].to_s).reject { |key, _value| key.empty? }
|
|
94
|
+
|
|
95
|
+
redirect_to(pairs.empty? ? path : "#{path}?#{URI.encode_www_form(pairs)}")
|
|
90
96
|
end
|
|
91
97
|
|
|
92
98
|
def store_jwt(token)
|