castle-rb 1.0.4 → 1.0.5

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
  SHA1:
3
- metadata.gz: f29d883260a833fa197ad7d37aea81bd54ff8341
4
- data.tar.gz: fb8383fd0f08037a47dea1bae56ce936acb96b02
3
+ metadata.gz: a5cc61c1968c76886ed79bcfdb8bcbe7a0b2e461
4
+ data.tar.gz: 61e68682c3a8189955c1ccd58eba566d07adc568
5
5
  SHA512:
6
- metadata.gz: 71a707f25b7b79cad49affab601bbec6e5db1d5bc9cff9c337c4e816c6d86def402cd825bd19fe88541292e6d93a90d350b04a59d802aa1362f0aa520b50b2b5
7
- data.tar.gz: 41a3a555559dd662789e14dc1af6e8a9ca4998ef42b871540c399ac5bd4e57f0a23148b8ec982dded35313ee82e399ccc217c41acb77918a810235d4056dab15
6
+ metadata.gz: f393006a3b3ad7826dd76dafd12a66f6f1999fc8f3f4e0de18cf71a10917d5c30a39a3d8c2a9397ee2445d448cf2705ad7f25c23ebfd00005a1383f1ff9f4a78
7
+ data.tar.gz: 1da76b1851dd486d928f02f96a0201dd314e55bd8ff610548c0019cd4d0b96deb723c65e73dad24eacef07528726239d98c4a951b0418fb1f5146bcf0ec656be
@@ -7,10 +7,8 @@ module Castle
7
7
  def initialize(jwt)
8
8
  begin
9
9
  raise Castle::SecurityError, 'Empty JWT' unless jwt
10
- @payload = ::JWT.decode(jwt, Castle.config.api_secret, true) do |header|
11
- @header = header.with_indifferent_access
12
- Castle.config.api_secret # used by the 'key finder' in the JWT gem
13
- end.with_indifferent_access
10
+ @payload, @header = ::JWT.decode(jwt, Castle.config.api_secret, true)
11
+ @payload = @payload.with_indifferent_access
14
12
  rescue ::JWT::DecodeError => e
15
13
  raise Castle::SecurityError.new(e)
16
14
  end
@@ -1,3 +1,3 @@
1
1
  module Castle
2
- VERSION = "1.0.4"
2
+ VERSION = "1.0.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: castle-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Johan
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 0.1.13
61
+ version: 1.2.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 0.1.13
68
+ version: 1.2.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: request_store
71
71
  requirement: !ruby/object:Gem::Requirement