jwt_api_auth 0.0.1.pre.2 → 0.0.1.pre.3

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: 9a3d6706c3f7eca8fde96b0646701053a353cd8441bd8e3433e0cc0809ebc203
4
- data.tar.gz: e6fedc984827b63767f2ded9a7b9883c05874f1e15c3d83a5900a97e7b4bcc90
3
+ metadata.gz: ed0ceb76ea7d4dddf1e1d38c5ffd79b40a1df043bf0c2e41e2fe22257d7f0121
4
+ data.tar.gz: a9d5bbee9fa0306909fc1f82df818429028c441caf12ecbf1d84298f90f463c9
5
5
  SHA512:
6
- metadata.gz: 3483d02230bf7e03a0dfd944f5f1dbf418d256e0775685c0b4bc42350a2a19986775272be1da11904fac3ca8345aaa1f1a2353a84cd471bcb2f5ceb3fcc1a5f4
7
- data.tar.gz: 3032a7fb6f88f07cab5e1a2fdc5361d8d471ca07b2f1567637d69c76786828d17aa2396f264a25aebeb4dd79fc91de3f2b082193e6b61047f2585de2c19d1ad8
6
+ metadata.gz: 34360291d4cd06e99cd5bbf8024fef71e061f306b61c593503b03be7a422ca301765c01c8593eb9f2cf6f7f52bbd92822daca87f162c0fe659454fa9b5ae3396
7
+ data.tar.gz: 58c750eef7a477774a57b98e9a3ec221dbd28540aa7b0750e8a27456b97c314c108f20243e77c5f1bf2fe079921b13ea6ec1bc9cc59f1318f06146085f80fb63
@@ -5,7 +5,7 @@ module JwtApiAuth
5
5
  skip_before_action :verify_authenticity_token
6
6
  before_action :authenticate_user
7
7
 
8
- rescue_from JWT::DecodeError do
8
+ rescue_from ::JWT::DecodeError do
9
9
  head :unauthorized
10
10
  end
11
11
 
@@ -17,7 +17,7 @@ module JwtApiAuth
17
17
 
18
18
  def authenticate_user
19
19
  token = request.headers['Authorization']&.split('Bearer ')&.last
20
- JWT.decode token, JwtApiAuth.token_secret.call, true, { algorithm: 'HS256' }
20
+ ::JWT.decode token, JwtApiAuth.token_secret.call, true, { algorithm: 'HS256' }
21
21
 
22
22
  head :unauthorized unless token
23
23
  end
@@ -58,7 +58,7 @@ module JwtApiAuth
58
58
  end
59
59
 
60
60
  def token
61
- JWT.encode payload, JwtApiAuth.token_secret.call, 'HS256'
61
+ ::JWT.encode payload, JwtApiAuth.token_secret.call, 'HS256'
62
62
  end
63
63
  end
64
64
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JwtApiAuth
4
- VERSION = '0.0.1.pre.2'
4
+ VERSION = '0.0.1.pre.3'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jwt_api_auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1.pre.2
4
+ version: 0.0.1.pre.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cristian Stügelmayer