usps-jwt_auth 0.3.1.pre.1 → 0.3.1

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: 18e8333bef29ea9eebd1af1732c8cd15efad9eba06932cc71d9818dc7f3ccb6f
4
- data.tar.gz: 8a0e76c117bb9edd5db3bee9f94c1e0852e6e6755b1ac66c1d2e4fb59facf299
3
+ metadata.gz: 997cd79009d1fd99f6e9ca4432cc4caa0b5e04fc2d25e0e53bf13599b4550445
4
+ data.tar.gz: beb3b2c034cbb9425228c9f1d81fed525b95ed243a368b274f4db26ed79627fe
5
5
  SHA512:
6
- metadata.gz: 9ec303cdf9742b2ba48d5128e21e0d44b3d638c37cbbb8b480e44d057cd09d4e9d0cc103164d846bf26b4213eefbb675175ca9bdbb85139337f41e8893164efe
7
- data.tar.gz: 8ddd25c68c12c6e75728bb9fce69e1fce803d5613adbf13f756451c9bba3d42f4bb181f8d20fde2cf6298c7447577507fdf87b210f92a54fa3391c424f72a205
6
+ metadata.gz: 0a317065f5c8f978cf8cd5be2431021470ce50c69b5cf9609030be1b6f90d7c26cc9c41e0bea69e4ea9f73e7733df18a38e113e2be4e721e321e585432e52acd
7
+ data.tar.gz: 5718c4d025cd45700fca00c39864189867ec71d28ce26ae91f88757d70c6ed0c47af7db10f9a753cd13f6b587c1c50bb54d95d53869271939c642fce960f798e
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- usps-jwt_auth (0.3.1.pre.pre.1)
4
+ usps-jwt_auth (0.3.1)
5
5
  activesupport (~> 8.0)
6
6
  colorize (~> 1.1)
7
7
  fileutils (~> 1.7)
@@ -73,7 +73,9 @@ module Usps
73
73
  store_jwt(params[:jwt])
74
74
  ensure_valid_jwt_has_valid_member!
75
75
 
76
+ Rails.logger.info 'set_new_jwt redirect' # DEBUG
76
77
  redirect_to(params[:path] || root_path)
78
+ @set_new_jwt = true
77
79
  end
78
80
 
79
81
  def store_jwt(token)
@@ -103,6 +105,8 @@ module Usps
103
105
  end
104
106
 
105
107
  def redirect_to_login
108
+ return if @set_new_jwt
109
+
106
110
  url = 'https://www.usps.org/jwt'
107
111
  local = "#{url}?local&port=#{ENV.fetch('PORT', '3000')}"
108
112
  production = "#{url}?application=#{JwtAuth.config.audience}"
@@ -116,6 +120,8 @@ module Usps
116
120
  fetch_jwt
117
121
  jwt_user
118
122
  rescue ActiveRecord::RecordNotFound
123
+ Rails.logger.info 'ensure_valid_jwt_has_valid_member!' # DEBUG
124
+
119
125
  reset_session
120
126
  clear_jwt
121
127
  @current_user = nil
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Usps
4
4
  module JwtAuth
5
- VERSION = '0.3.1-1'
5
+ VERSION = '0.3.1'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: usps-jwt_auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1.pre.1
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julian Fiander