zaikio-jwt_auth 2.8.0 → 2.8.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c24518cc88a6fd45b415882497799e08ba4e9f8962a59b58e6bf80a0e3a79478
4
- data.tar.gz: 04ceb1db55359f0a7a1506efd9df3b20f77de892a11e61fc19f4c28ba3492792
3
+ metadata.gz: f308d2a04e7881d90f571269979d86d58295f6e377ea88db424474a065536e88
4
+ data.tar.gz: 3b08b008750bfc44e32568d1855dfd7a861bbdd2be5da7aaf230299a5f05a77d
5
5
  SHA512:
6
- metadata.gz: 1b89cff570d1274a8b3c06311f67ddd487725ddca9d7cd8d098e5a174b025a1d9f9e811348d2b3dd9c5bd1f0d9bb67999bdd67e85b321dc704c3489412b31ff8
7
- data.tar.gz: c1ebdd6aeb037503643b5704bd3682d4d64c62b62fc2d316f9480797069136d1d1e042de1244db714edcd01c2fa69af6ba6cdb31bf18c97a1e8426b25c05846c
6
+ metadata.gz: a75934a43fa21961b000e2ce08d9306877f1a11318738a03ef608aad8006d8356637a51f116b089d7de9c2d9f25f4fcf2bdb3f788401b6bf941008291b55f341
7
+ data.tar.gz: 72c7ac1c7a09da85234c31568943f8ebd6fae9f0c0cdf85f2b16728bec36cde953155e2a1312271e34da5eca17fd9cfe6baeb20b8c2c753387770d5c89822508
@@ -1,5 +1,5 @@
1
1
  module Zaikio
2
2
  module JWTAuth
3
- VERSION = "2.8.0".freeze
3
+ VERSION = "2.8.1".freeze
4
4
  end
5
5
  end
@@ -62,7 +62,15 @@ module Zaikio
62
62
  HEADER_FORMAT = /\ABearer (.+)\z/.freeze
63
63
 
64
64
  def self.extract(authorization_header_string, **options)
65
- return TokenData.new(Zaikio::JWTAuth.mocked_jwt_payload) if Zaikio::JWTAuth.mocked_jwt_payload
65
+ if Zaikio::JWTAuth.mocked_jwt_payload
66
+ jwk = Zaikio::JWTAuth::TestHelper.jwk
67
+ return TokenData.new(Zaikio::JWTAuth.mocked_jwt_payload, token: JWT.encode(
68
+ Zaikio::JWTAuth.mocked_jwt_payload,
69
+ jwk.signing_key,
70
+ jwk[:alg],
71
+ kid: jwk[:kid]
72
+ ))
73
+ end
66
74
 
67
75
  return if authorization_header_string.blank?
68
76
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zaikio-jwt_auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.0
4
+ version: 2.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - crispymtn