usps-jwt_auth 0.0.2 → 0.0.4

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: 72bc8a1eee0aa003526f0cd44b22e1c31a4c393df78c70168a87c90bad7ee561
4
- data.tar.gz: 027b5fa87c7c909a07a4767b54ee410cf650ed489be0c47a04e0ce23f2b2db6b
3
+ metadata.gz: ae0acc782c09d52d721375bb82679e65e8e3a39d8e76c73be42de3d9200f7d24
4
+ data.tar.gz: a920c09f41b7cc7458a27796a75ecf87efb0a8c2d932aa8ad973ac9a37cfe8d1
5
5
  SHA512:
6
- metadata.gz: 9ec5ab02c06c7c79c5d782c9f75e7276780d691fdea38702167f7222647cbab5380a52e1719b9746d0255a2938199071737cef015acf70409e974a08e3e2a5dd
7
- data.tar.gz: c6bf04cd280d38ff204de64fc7f907c04515faefacfbc40c23e3b857dcd362c3dee21de203d8d54f42ebcec0019007f7852fcb1d4d6aef8cb1233e7b7f265c93
6
+ metadata.gz: 0e0f3369200bcdfb24f84a973873965521088bba354f5de60e93fad8816d1ea81ee46e7a47e2eb875463906eb893c534db93810094c9df64476f66dddd293ebd
7
+ data.tar.gz: 8c1e24776b1dd9228baddc8123acaa5f4999a1d46676399747764a189c2284f87b283d6955be3ae35abe99d170adfbcbbc0a7699a5ef4b9486085271d77d6ea3
@@ -22,8 +22,7 @@ module Usps
22
22
  {
23
23
  issuer_base: 'usps:1',
24
24
  issuers: [],
25
- audience: nil,
26
- algorithm: 'RS512'
25
+ audience: nil
27
26
  }.merge(hash)
28
27
  )
29
28
  end
@@ -9,7 +9,7 @@ module Usps
9
9
  required_claims: %w[iss exp],
10
10
  verify_iss: true,
11
11
  verify_aud: true,
12
- algorithm: JwtAuth.configuration.jwt.algorithm
12
+ algorithm: 'RS512'
13
13
  }.freeze
14
14
 
15
15
  def self.decode(token, audience: [], issuer: nil)
@@ -5,8 +5,6 @@ module Usps
5
5
  # Encode data as a JWT
6
6
  #
7
7
  class Encode
8
- JwtAuth.configuration.key_size
9
-
10
8
  def self.encode(data, expiration_time: 15 * 60, audience: [], issuer: nil)
11
9
  new(expiration_time: expiration_time, audience: audience, issuer: issuer).encode(data)
12
10
  end
@@ -73,7 +71,7 @@ module Usps
73
71
  end
74
72
 
75
73
  def generate_private_key
76
- OpenSSL::PKey::RSA.generate(KEY_SIZE)
74
+ OpenSSL::PKey::RSA.generate(JwtAuth.configuration.key_size)
77
75
  end
78
76
  end
79
77
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Usps
4
4
  module JwtAuth
5
- VERSION = '0.0.2'
5
+ VERSION = '0.0.4'
6
6
  end
7
7
  end
data/lib/usps/jwt_auth.rb CHANGED
@@ -8,7 +8,8 @@ require_relative 'jwt_auth/decode'
8
8
  require_relative 'jwt_auth/concern'
9
9
 
10
10
  module Usps
11
- # DOC COMMENT
11
+ # Unified configuration for handling JWT Authentication
12
+ #
12
13
  module JwtAuth
13
14
  class << self
14
15
  def configuration
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.0.2
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julian Fiander