usps-jwt_auth 1.0.4 → 1.0.6
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 +3 -6
- 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: 2b570538c78235e550ff7903dfb293cbf8d7116ee050af858a963db6ddc84c2e
|
|
4
|
+
data.tar.gz: e41a91e29de1b8449780e39d0bf93b8ca61f3f08eb43ff08f470ac244a2675ea
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8eaf955b197330910784b35669dec3ef5d6cd073f910f66623188f2e6fa672c588e84ec45bea8f2e045b1809ff39241f356e398b501217d9a743a7f69b0b192f
|
|
7
|
+
data.tar.gz: 73f575a6f21f5efa3fdbdf485f208d163d7d25b2de288ce641048acaf27b9f4809a36478278c785bb148843f470d503fbf5fb8e9395b71e089b149e0686248f2
|
data/Gemfile.lock
CHANGED
|
@@ -78,11 +78,8 @@ module Usps
|
|
|
78
78
|
end
|
|
79
79
|
|
|
80
80
|
def redirect_to_path!
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
else
|
|
84
|
-
redirect_to(params[:path] || root_path)
|
|
85
|
-
end
|
|
81
|
+
path = params[:path] || root_path
|
|
82
|
+
redirect_to(params.key?(:query_string) ? "#{path}?query_string=#{CGI.escape(params[:query_string])}" : path)
|
|
86
83
|
end
|
|
87
84
|
|
|
88
85
|
def store_jwt(token)
|
|
@@ -114,7 +111,7 @@ module Usps
|
|
|
114
111
|
def redirect_to_login
|
|
115
112
|
return if @set_new_jwt
|
|
116
113
|
|
|
117
|
-
url = 'https://www.usps.org/jwt'
|
|
114
|
+
url = 'https://www.usps.org/jwt/'
|
|
118
115
|
local = "#{url}?local&port=#{ENV.fetch('PORT', '3000')}"
|
|
119
116
|
production = "#{url}?application=#{JwtAuth.config.audience}"
|
|
120
117
|
url = JwtAuth.config.environment.development? ? local : production
|