usps-jwt_auth 0.2.1 → 0.2.2

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: 357bab1e1b2d7160faaae475b6666bf78d2c835b90dd7c9ee5009b4c9d67cc68
4
- data.tar.gz: 49a97cfb8e6dfc729f8e2221779ca9e7c541057e9bf260a49dbb7138ea75619f
3
+ metadata.gz: b47c67acb15725e8c917939e63221c4ccce7b7349ef6dc646cddbe4d20bf9f6a
4
+ data.tar.gz: 295d13e0324e375fb220867d87b81f278fb94cbc92b973901cd1b1a40f5cbb7e
5
5
  SHA512:
6
- metadata.gz: ad26fdabdfbbc6047875936cb9b2735c0e0bcbbc63fbab9588c052bc21d0b0c87165630f664be7f39c2d792ec3c8ae2c4016e3b27356f0ba9cc67a1b14016dd0
7
- data.tar.gz: 56f6cfd1f4e7f4912c1993cced316c32278a41cc393e2cc2111fdcb1446fc19ee52786f56071b0ac96895fcece4c192f42c6c8bee0cfa94f1de0e4ec7c376b96
6
+ metadata.gz: 7c9b35aa03f7444a8c50d0522a98acd80cbb90a4ad0e0d04156657646111a6ef58a14fd8860bcc3b11caecf3a741779ab7ca71b9bc4f80313a4f83648058fb04
7
+ data.tar.gz: 32cedad0d2a28fb036e502bce1b86979c7b7e1faa2ad26b79c37258b7e424457601a10b360db093158e4ea3191527dc5e23f85ca931fa010f95d871e87022a1a
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- usps-jwt_auth (0.2.1)
4
+ usps-jwt_auth (0.2.2)
5
5
  activesupport (~> 8.0)
6
6
  fileutils (~> 1.7)
7
7
  jwt (~> 3.1)
data/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
  Add the gem to your Gemfile:
8
8
 
9
9
  ```ruby
10
- gem 'usps-jwt_auth', '>= 0.1.0'
10
+ gem 'usps-jwt_auth', '>= 0.2.1'
11
11
  ```
12
12
 
13
13
  Then run the install task:
@@ -95,15 +95,15 @@ module Usps
95
95
  def jwt
96
96
  Decode.decode(
97
97
  fetch_jwt,
98
- audience: [JwtAuth.config.jwt.audience],
99
- issuer: JwtAuth.config.jwt.issuer
98
+ audience: [JwtAuth.config.audience],
99
+ issuer: JwtAuth.config.issuer
100
100
  )
101
101
  end
102
102
 
103
103
  def redirect_to_login
104
104
  url = 'https://www.usps.org/jwt'
105
105
  local = "#{url}?local&port=#{ENV.fetch('PORT', '3000')}"
106
- production = "#{url}?application=#{JwtAuth.config.jwt.audience}"
106
+ production = "#{url}?application=#{JwtAuth.config.audience}"
107
107
  url = JwtAuth.config.environment.development? ? local : production
108
108
  url = "#{url}&path=#{request.path}"
109
109
 
@@ -116,7 +116,7 @@ module Usps
116
116
  store_jwt(
117
117
  Encode.encode(
118
118
  { certificate: ENV['STUB_CERTIFICATE'].presence || 'E123456' },
119
- audience: [JwtAuth.config.jwt.audience], issuer: JwtAuth.config.jwt.issuers.first
119
+ audience: [JwtAuth.config.audience], issuer: JwtAuth.config.issuers.first
120
120
  )
121
121
  )
122
122
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Usps
4
4
  module JwtAuth
5
- VERSION = '0.2.1'
5
+ VERSION = '0.2.2'
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.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julian Fiander