jwt 2.8.2 → 2.10.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 +4 -4
- data/CHANGELOG.md +79 -0
- data/README.md +189 -93
- data/lib/jwt/base64.rb +3 -0
- data/lib/jwt/claims/audience.rb +30 -0
- data/lib/jwt/claims/crit.rb +35 -0
- data/lib/jwt/claims/decode_verifier.rb +40 -0
- data/lib/jwt/claims/expiration.rb +32 -0
- data/lib/jwt/claims/issued_at.rb +22 -0
- data/lib/jwt/claims/issuer.rb +34 -0
- data/lib/jwt/claims/jwt_id.rb +35 -0
- data/lib/jwt/claims/not_before.rb +32 -0
- data/lib/jwt/claims/numeric.rb +77 -0
- data/lib/jwt/claims/required.rb +33 -0
- data/lib/jwt/claims/subject.rb +30 -0
- data/lib/jwt/claims/verification_methods.rb +20 -0
- data/lib/jwt/claims/verifier.rb +61 -0
- data/lib/jwt/claims.rb +74 -0
- data/lib/jwt/claims_validator.rb +6 -25
- data/lib/jwt/configuration/container.rb +20 -0
- data/lib/jwt/configuration/decode_configuration.rb +24 -0
- data/lib/jwt/configuration/jwk_configuration.rb +1 -0
- data/lib/jwt/configuration.rb +8 -0
- data/lib/jwt/decode.rb +28 -70
- data/lib/jwt/deprecations.rb +1 -0
- data/lib/jwt/encode.rb +17 -60
- data/lib/jwt/encoded_token.rb +139 -0
- data/lib/jwt/error.rb +34 -0
- data/lib/jwt/json.rb +1 -1
- data/lib/jwt/jwa/compat.rb +32 -0
- data/lib/jwt/jwa/ecdsa.rb +39 -25
- data/lib/jwt/jwa/eddsa.rb +20 -27
- data/lib/jwt/jwa/hmac.rb +25 -18
- data/lib/jwt/jwa/hmac_rbnacl.rb +43 -43
- data/lib/jwt/jwa/hmac_rbnacl_fixed.rb +40 -39
- data/lib/jwt/jwa/none.rb +8 -3
- data/lib/jwt/jwa/ps.rb +20 -15
- data/lib/jwt/jwa/rsa.rb +20 -10
- data/lib/jwt/jwa/signing_algorithm.rb +63 -0
- data/lib/jwt/jwa/unsupported.rb +9 -8
- data/lib/jwt/jwa/wrapper.rb +27 -9
- data/lib/jwt/jwa.rb +30 -34
- data/lib/jwt/jwk/ec.rb +2 -3
- data/lib/jwt/jwk/hmac.rb +2 -3
- data/lib/jwt/jwk/key_base.rb +1 -0
- data/lib/jwt/jwk/key_finder.rb +1 -0
- data/lib/jwt/jwk/kid_as_key_digest.rb +1 -0
- data/lib/jwt/jwk/okp_rbnacl.rb +3 -4
- data/lib/jwt/jwk/rsa.rb +2 -3
- data/lib/jwt/jwk/set.rb +2 -0
- data/lib/jwt/jwk.rb +1 -0
- data/lib/jwt/token.rb +112 -0
- data/lib/jwt/verify.rb +16 -93
- data/lib/jwt/version.rb +30 -9
- data/lib/jwt.rb +20 -0
- data/ruby-jwt.gemspec +1 -0
- metadata +36 -7
data/lib/jwt/jwk/okp_rbnacl.rb
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
module JWT
|
4
4
|
module JWK
|
5
|
+
# JSON Web Key (JWK) representation for Ed25519 keys
|
5
6
|
class OKPRbNaCl < KeyBase
|
6
7
|
KTY = 'OKP'
|
7
8
|
KTYS = [KTY, JWT::JWK::OKPRbNaCl, RbNaCl::Signatures::Ed25519::SigningKey, RbNaCl::Signatures::Ed25519::VerifyKey].freeze
|
@@ -10,7 +11,7 @@ module JWT
|
|
10
11
|
|
11
12
|
def initialize(key, params = nil, options = {})
|
12
13
|
params ||= {}
|
13
|
-
|
14
|
+
Deprecations.warning('Using the OKP JWK for Ed25519 keys is deprecated and will be removed in a future version of ruby-jwt. Please use the ruby-eddsa gem instead.')
|
14
15
|
# For backwards compatibility when kid was a String
|
15
16
|
params = { kid: params } if params.is_a?(String)
|
16
17
|
|
@@ -83,9 +84,7 @@ module JWT
|
|
83
84
|
x: ::JWT::Base64.url_encode(verify_key.to_bytes)
|
84
85
|
}
|
85
86
|
|
86
|
-
if signing_key
|
87
|
-
params[:d] = ::JWT::Base64.url_encode(signing_key.to_bytes)
|
88
|
-
end
|
87
|
+
params[:d] = ::JWT::Base64.url_encode(signing_key.to_bytes) if signing_key
|
89
88
|
|
90
89
|
params
|
91
90
|
end
|
data/lib/jwt/jwk/rsa.rb
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
module JWT
|
4
4
|
module JWK
|
5
|
+
# JSON Web Key (JWK) representation of a RSA key
|
5
6
|
class RSA < KeyBase # rubocop:disable Metrics/ClassLength
|
6
7
|
BINARY = 2
|
7
8
|
KTY = 'RSA'
|
@@ -64,9 +65,7 @@ module JWT
|
|
64
65
|
end
|
65
66
|
|
66
67
|
def []=(key, value)
|
67
|
-
if RSA_KEY_ELEMENTS.include?(key.to_sym)
|
68
|
-
raise ArgumentError, 'cannot overwrite cryptographic key attributes'
|
69
|
-
end
|
68
|
+
raise ArgumentError, 'cannot overwrite cryptographic key attributes' if RSA_KEY_ELEMENTS.include?(key.to_sym)
|
70
69
|
|
71
70
|
super(key, value)
|
72
71
|
end
|
data/lib/jwt/jwk/set.rb
CHANGED
data/lib/jwt/jwk.rb
CHANGED
data/lib/jwt/token.rb
ADDED
@@ -0,0 +1,112 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module JWT
|
4
|
+
# Represents a JWT token
|
5
|
+
#
|
6
|
+
# Basic token signed using the HS256 algorithm:
|
7
|
+
#
|
8
|
+
# token = JWT::Token.new(payload: {pay: 'load'})
|
9
|
+
# token.sign!(algorithm: 'HS256', key: 'secret')
|
10
|
+
# token.jwt # => eyJhb....
|
11
|
+
#
|
12
|
+
# Custom headers will be combined with generated headers:
|
13
|
+
# token = JWT::Token.new(payload: {pay: 'load'}, header: {custom: "value"})
|
14
|
+
# token.sign!(algorithm: 'HS256', key: 'secret')
|
15
|
+
# token.header # => {"custom"=>"value", "alg"=>"HS256"}
|
16
|
+
#
|
17
|
+
class Token
|
18
|
+
include Claims::VerificationMethods
|
19
|
+
|
20
|
+
# Initializes a new Token instance.
|
21
|
+
#
|
22
|
+
# @param header [Hash] the header of the JWT token.
|
23
|
+
# @param payload [Hash] the payload of the JWT token.
|
24
|
+
def initialize(payload:, header: {})
|
25
|
+
@header = header&.transform_keys(&:to_s)
|
26
|
+
@payload = payload
|
27
|
+
end
|
28
|
+
|
29
|
+
# Returns the decoded signature of the JWT token.
|
30
|
+
#
|
31
|
+
# @return [String] the decoded signature of the JWT token.
|
32
|
+
def signature
|
33
|
+
@signature ||= ::JWT::Base64.url_decode(encoded_signature || '')
|
34
|
+
end
|
35
|
+
|
36
|
+
# Returns the encoded signature of the JWT token.
|
37
|
+
#
|
38
|
+
# @return [String] the encoded signature of the JWT token.
|
39
|
+
def encoded_signature
|
40
|
+
@encoded_signature ||= ::JWT::Base64.url_encode(signature)
|
41
|
+
end
|
42
|
+
|
43
|
+
# Returns the decoded header of the JWT token.
|
44
|
+
#
|
45
|
+
# @return [Hash] the header of the JWT token.
|
46
|
+
attr_reader :header
|
47
|
+
|
48
|
+
# Returns the encoded header of the JWT token.
|
49
|
+
#
|
50
|
+
# @return [String] the encoded header of the JWT token.
|
51
|
+
def encoded_header
|
52
|
+
@encoded_header ||= ::JWT::Base64.url_encode(JWT::JSON.generate(header))
|
53
|
+
end
|
54
|
+
|
55
|
+
# Returns the payload of the JWT token.
|
56
|
+
#
|
57
|
+
# @return [Hash] the payload of the JWT token.
|
58
|
+
attr_reader :payload
|
59
|
+
|
60
|
+
# Returns the encoded payload of the JWT token.
|
61
|
+
#
|
62
|
+
# @return [String] the encoded payload of the JWT token.
|
63
|
+
def encoded_payload
|
64
|
+
@encoded_payload ||= ::JWT::Base64.url_encode(JWT::JSON.generate(payload))
|
65
|
+
end
|
66
|
+
|
67
|
+
# Returns the signing input of the JWT token.
|
68
|
+
#
|
69
|
+
# @return [String] the signing input of the JWT token.
|
70
|
+
def signing_input
|
71
|
+
@signing_input ||= [encoded_header, encoded_payload].join('.')
|
72
|
+
end
|
73
|
+
|
74
|
+
# Returns the JWT token as a string.
|
75
|
+
#
|
76
|
+
# @return [String] the JWT token as a string.
|
77
|
+
# @raise [JWT::EncodeError] if the token is not signed or other encoding issues
|
78
|
+
def jwt
|
79
|
+
@jwt ||= (@signature && [encoded_header, @detached_payload ? '' : encoded_payload, encoded_signature].join('.')) || raise(::JWT::EncodeError, 'Token is not signed')
|
80
|
+
end
|
81
|
+
|
82
|
+
# Detaches the payload according to https://datatracker.ietf.org/doc/html/rfc7515#appendix-F
|
83
|
+
#
|
84
|
+
def detach_payload!
|
85
|
+
@detached_payload = true
|
86
|
+
|
87
|
+
nil
|
88
|
+
end
|
89
|
+
|
90
|
+
# Signs the JWT token.
|
91
|
+
#
|
92
|
+
# @param algorithm [String, Object] the algorithm to use for signing.
|
93
|
+
# @param key [String] the key to use for signing.
|
94
|
+
# @return [void]
|
95
|
+
# @raise [JWT::EncodeError] if the token is already signed or other problems when signing
|
96
|
+
def sign!(algorithm:, key:)
|
97
|
+
raise ::JWT::EncodeError, 'Token already signed' if @signature
|
98
|
+
|
99
|
+
JWA.resolve(algorithm).tap do |algo|
|
100
|
+
header.merge!(algo.header)
|
101
|
+
@signature = algo.sign(data: signing_input, signing_key: key)
|
102
|
+
end
|
103
|
+
|
104
|
+
nil
|
105
|
+
end
|
106
|
+
|
107
|
+
# Returns the JWT token as a string.
|
108
|
+
#
|
109
|
+
# @return [String] the JWT token as a string.
|
110
|
+
alias to_s jwt
|
111
|
+
end
|
112
|
+
end
|
data/lib/jwt/verify.rb
CHANGED
@@ -1,117 +1,40 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
3
|
+
require_relative 'error'
|
4
4
|
|
5
5
|
module JWT
|
6
|
-
#
|
6
|
+
# @deprecated This class is deprecated and will be removed in the next major version of ruby-jwt.
|
7
7
|
class Verify
|
8
|
-
DEFAULTS = {
|
9
|
-
|
10
|
-
}.freeze
|
8
|
+
DEFAULTS = { leeway: 0 }.freeze
|
9
|
+
METHODS = %w[verify_aud verify_expiration verify_iat verify_iss verify_jti verify_not_before verify_sub verify_required_claims].freeze
|
11
10
|
|
11
|
+
private_constant(:DEFAULTS, :METHODS)
|
12
12
|
class << self
|
13
|
-
|
14
|
-
define_method
|
13
|
+
METHODS.each do |method_name|
|
14
|
+
define_method(method_name) do |payload, options|
|
15
15
|
new(payload, options).send(method_name)
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
19
|
+
# @deprecated This method is deprecated and will be removed in the next major version of ruby-jwt.
|
19
20
|
def verify_claims(payload, options)
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
Verify.send(key, payload, options) if val
|
24
|
-
end
|
21
|
+
Deprecations.warning('The ::JWT::Verify.verify_claims method is deprecated and will be removed in the next major version of ruby-jwt')
|
22
|
+
::JWT::Claims.verify!(payload, options)
|
23
|
+
true
|
25
24
|
end
|
26
25
|
end
|
27
26
|
|
27
|
+
# @deprecated This class is deprecated and will be removed in the next major version of ruby-jwt.
|
28
28
|
def initialize(payload, options)
|
29
|
+
Deprecations.warning('The ::JWT::Verify class is deprecated and will be removed in the next major version of ruby-jwt')
|
29
30
|
@payload = payload
|
30
31
|
@options = DEFAULTS.merge(options)
|
31
32
|
end
|
32
33
|
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
aud = @payload['aud']
|
37
|
-
raise JWT::InvalidAudError, "Invalid audience. Expected #{options_aud}, received #{aud || '<none>'}" if ([*aud] & [*options_aud]).empty?
|
38
|
-
end
|
39
|
-
|
40
|
-
def verify_expiration
|
41
|
-
return unless contains_key?(@payload, 'exp')
|
42
|
-
raise JWT::ExpiredSignature, 'Signature has expired' if @payload['exp'].to_i <= (Time.now.to_i - exp_leeway)
|
43
|
-
end
|
44
|
-
|
45
|
-
def verify_iat
|
46
|
-
return unless contains_key?(@payload, 'iat')
|
47
|
-
|
48
|
-
iat = @payload['iat']
|
49
|
-
raise JWT::InvalidIatError, 'Invalid iat' if !iat.is_a?(Numeric) || iat.to_f > Time.now.to_f
|
50
|
-
end
|
51
|
-
|
52
|
-
def verify_iss
|
53
|
-
return unless (options_iss = @options[:iss])
|
54
|
-
|
55
|
-
iss = @payload['iss']
|
56
|
-
|
57
|
-
options_iss = Array(options_iss).map { |item| item.is_a?(Symbol) ? item.to_s : item }
|
58
|
-
|
59
|
-
case iss
|
60
|
-
when *options_iss
|
61
|
-
nil
|
62
|
-
else
|
63
|
-
raise JWT::InvalidIssuerError, "Invalid issuer. Expected #{options_iss}, received #{iss || '<none>'}"
|
34
|
+
METHODS.each do |method_name|
|
35
|
+
define_method(method_name) do
|
36
|
+
::JWT::Claims.verify!(@payload, @options.merge(method_name => true))
|
64
37
|
end
|
65
38
|
end
|
66
|
-
|
67
|
-
def verify_jti
|
68
|
-
options_verify_jti = @options[:verify_jti]
|
69
|
-
jti = @payload['jti']
|
70
|
-
|
71
|
-
if options_verify_jti.respond_to?(:call)
|
72
|
-
verified = options_verify_jti.arity == 2 ? options_verify_jti.call(jti, @payload) : options_verify_jti.call(jti)
|
73
|
-
raise JWT::InvalidJtiError, 'Invalid jti' unless verified
|
74
|
-
elsif jti.to_s.strip.empty?
|
75
|
-
raise JWT::InvalidJtiError, 'Missing jti'
|
76
|
-
end
|
77
|
-
end
|
78
|
-
|
79
|
-
def verify_not_before
|
80
|
-
return unless contains_key?(@payload, 'nbf')
|
81
|
-
raise JWT::ImmatureSignature, 'Signature nbf has not been reached' if @payload['nbf'].to_i > (Time.now.to_i + nbf_leeway)
|
82
|
-
end
|
83
|
-
|
84
|
-
def verify_sub
|
85
|
-
return unless (options_sub = @options[:sub])
|
86
|
-
|
87
|
-
sub = @payload['sub']
|
88
|
-
raise JWT::InvalidSubError, "Invalid subject. Expected #{options_sub}, received #{sub || '<none>'}" unless sub.to_s == options_sub.to_s
|
89
|
-
end
|
90
|
-
|
91
|
-
def verify_required_claims
|
92
|
-
return unless (options_required_claims = @options[:required_claims])
|
93
|
-
|
94
|
-
options_required_claims.each do |required_claim|
|
95
|
-
raise JWT::MissingRequiredClaim, "Missing required claim #{required_claim}" unless contains_key?(@payload, required_claim)
|
96
|
-
end
|
97
|
-
end
|
98
|
-
|
99
|
-
private
|
100
|
-
|
101
|
-
def global_leeway
|
102
|
-
@options[:leeway]
|
103
|
-
end
|
104
|
-
|
105
|
-
def exp_leeway
|
106
|
-
@options[:exp_leeway] || global_leeway
|
107
|
-
end
|
108
|
-
|
109
|
-
def nbf_leeway
|
110
|
-
@options[:nbf_leeway] || global_leeway
|
111
|
-
end
|
112
|
-
|
113
|
-
def contains_key?(payload, key)
|
114
|
-
payload.respond_to?(:key?) && payload.key?(key)
|
115
|
-
end
|
116
39
|
end
|
117
40
|
end
|
data/lib/jwt/version.rb
CHANGED
@@ -1,44 +1,65 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
#
|
3
|
+
# JSON Web Token implementation
|
4
|
+
#
|
5
|
+
# Should be up to date with the latest spec:
|
6
|
+
# https://tools.ietf.org/html/rfc7519
|
4
7
|
module JWT
|
8
|
+
# Returns the gem version of the JWT library.
|
9
|
+
#
|
10
|
+
# @return [Gem::Version] the gem version.
|
5
11
|
def self.gem_version
|
6
|
-
Gem::Version.new
|
12
|
+
Gem::Version.new(VERSION::STRING)
|
7
13
|
end
|
8
14
|
|
9
|
-
#
|
15
|
+
# @api private
|
10
16
|
module VERSION
|
11
|
-
# major version
|
12
17
|
MAJOR = 2
|
13
|
-
|
14
|
-
MINOR = 8
|
15
|
-
# tiny version
|
18
|
+
MINOR = 10
|
16
19
|
TINY = 2
|
17
|
-
# alpha, beta, etc. tag
|
18
20
|
PRE = nil
|
19
21
|
|
20
|
-
# Build version string
|
21
22
|
STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
|
22
23
|
end
|
23
24
|
|
25
|
+
# Checks if the OpenSSL version is 3 or greater.
|
26
|
+
#
|
27
|
+
# @return [Boolean] true if OpenSSL version is 3 or greater, false otherwise.
|
28
|
+
# @api private
|
24
29
|
def self.openssl_3?
|
25
30
|
return false if OpenSSL::OPENSSL_VERSION.include?('LibreSSL')
|
26
31
|
|
27
32
|
true if 3 * 0x10000000 <= OpenSSL::OPENSSL_VERSION_NUMBER
|
28
33
|
end
|
29
34
|
|
35
|
+
# Checks if the RbNaCl library is defined.
|
36
|
+
#
|
37
|
+
# @return [Boolean] true if RbNaCl is defined, false otherwise.
|
38
|
+
# @api private
|
30
39
|
def self.rbnacl?
|
31
40
|
defined?(::RbNaCl)
|
32
41
|
end
|
33
42
|
|
43
|
+
# Checks if the RbNaCl library version is 6.0.0 or greater.
|
44
|
+
#
|
45
|
+
# @return [Boolean] true if RbNaCl version is 6.0.0 or greater, false otherwise.
|
46
|
+
# @api private
|
34
47
|
def self.rbnacl_6_or_greater?
|
35
48
|
rbnacl? && ::Gem::Version.new(::RbNaCl::VERSION) >= ::Gem::Version.new('6.0.0')
|
36
49
|
end
|
37
50
|
|
51
|
+
# Checks if there is an OpenSSL 3 HMAC empty key regression.
|
52
|
+
#
|
53
|
+
# @return [Boolean] true if there is an OpenSSL 3 HMAC empty key regression, false otherwise.
|
54
|
+
# @api private
|
38
55
|
def self.openssl_3_hmac_empty_key_regression?
|
39
56
|
openssl_3? && openssl_version <= ::Gem::Version.new('3.0.0')
|
40
57
|
end
|
41
58
|
|
59
|
+
# Returns the OpenSSL version.
|
60
|
+
#
|
61
|
+
# @return [Gem::Version] the OpenSSL version.
|
62
|
+
# @api private
|
42
63
|
def self.openssl_version
|
43
64
|
@openssl_version ||= ::Gem::Version.new(OpenSSL::VERSION)
|
44
65
|
end
|
data/lib/jwt.rb
CHANGED
@@ -9,6 +9,12 @@ require 'jwt/deprecations'
|
|
9
9
|
require 'jwt/encode'
|
10
10
|
require 'jwt/error'
|
11
11
|
require 'jwt/jwk'
|
12
|
+
require 'jwt/claims'
|
13
|
+
require 'jwt/encoded_token'
|
14
|
+
require 'jwt/token'
|
15
|
+
|
16
|
+
require 'jwt/claims_validator'
|
17
|
+
require 'jwt/verify'
|
12
18
|
|
13
19
|
# JSON Web Token implementation
|
14
20
|
#
|
@@ -19,6 +25,13 @@ module JWT
|
|
19
25
|
|
20
26
|
module_function
|
21
27
|
|
28
|
+
# Encodes a payload into a JWT.
|
29
|
+
#
|
30
|
+
# @param payload [Hash] the payload to encode.
|
31
|
+
# @param key [String] the key used to sign the JWT.
|
32
|
+
# @param algorithm [String] the algorithm used to sign the JWT.
|
33
|
+
# @param header_fields [Hash] additional headers to include in the JWT.
|
34
|
+
# @return [String] the encoded JWT.
|
22
35
|
def encode(payload, key, algorithm = 'HS256', header_fields = {})
|
23
36
|
Encode.new(payload: payload,
|
24
37
|
key: key,
|
@@ -26,6 +39,13 @@ module JWT
|
|
26
39
|
headers: header_fields).segments
|
27
40
|
end
|
28
41
|
|
42
|
+
# Decodes a JWT to extract the payload and header
|
43
|
+
#
|
44
|
+
# @param jwt [String] the JWT to decode.
|
45
|
+
# @param key [String] the key used to verify the JWT.
|
46
|
+
# @param verify [Boolean] whether to verify the JWT signature.
|
47
|
+
# @param options [Hash] additional options for decoding.
|
48
|
+
# @return [Array<Hash>] the decoded payload and headers.
|
29
49
|
def decode(jwt, key = nil, verify = true, options = {}, &keyfinder) # rubocop:disable Style/OptionalBooleanParameter
|
30
50
|
Deprecations.context do
|
31
51
|
Decode.new(jwt, key, verify, configuration.decode.to_h.merge(options), &keyfinder).decode_segments
|
data/ruby-jwt.gemspec
CHANGED
@@ -35,6 +35,7 @@ Gem::Specification.new do |spec|
|
|
35
35
|
|
36
36
|
spec.add_development_dependency 'appraisal'
|
37
37
|
spec.add_development_dependency 'bundler'
|
38
|
+
spec.add_development_dependency 'logger'
|
38
39
|
spec.add_development_dependency 'rake'
|
39
40
|
spec.add_development_dependency 'rspec'
|
40
41
|
spec.add_development_dependency 'rubocop'
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jwt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.10.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Rudat
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: base64
|
@@ -52,6 +51,20 @@ dependencies:
|
|
52
51
|
- - ">="
|
53
52
|
- !ruby/object:Gem::Version
|
54
53
|
version: '0'
|
54
|
+
- !ruby/object:Gem::Dependency
|
55
|
+
name: logger
|
56
|
+
requirement: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '0'
|
61
|
+
type: :development
|
62
|
+
prerelease: false
|
63
|
+
version_requirements: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - ">="
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0'
|
55
68
|
- !ruby/object:Gem::Dependency
|
56
69
|
name: rake
|
57
70
|
requirement: !ruby/object:Gem::Requirement
|
@@ -123,6 +136,20 @@ files:
|
|
123
136
|
- README.md
|
124
137
|
- lib/jwt.rb
|
125
138
|
- lib/jwt/base64.rb
|
139
|
+
- lib/jwt/claims.rb
|
140
|
+
- lib/jwt/claims/audience.rb
|
141
|
+
- lib/jwt/claims/crit.rb
|
142
|
+
- lib/jwt/claims/decode_verifier.rb
|
143
|
+
- lib/jwt/claims/expiration.rb
|
144
|
+
- lib/jwt/claims/issued_at.rb
|
145
|
+
- lib/jwt/claims/issuer.rb
|
146
|
+
- lib/jwt/claims/jwt_id.rb
|
147
|
+
- lib/jwt/claims/not_before.rb
|
148
|
+
- lib/jwt/claims/numeric.rb
|
149
|
+
- lib/jwt/claims/required.rb
|
150
|
+
- lib/jwt/claims/subject.rb
|
151
|
+
- lib/jwt/claims/verification_methods.rb
|
152
|
+
- lib/jwt/claims/verifier.rb
|
126
153
|
- lib/jwt/claims_validator.rb
|
127
154
|
- lib/jwt/configuration.rb
|
128
155
|
- lib/jwt/configuration/container.rb
|
@@ -131,9 +158,11 @@ files:
|
|
131
158
|
- lib/jwt/decode.rb
|
132
159
|
- lib/jwt/deprecations.rb
|
133
160
|
- lib/jwt/encode.rb
|
161
|
+
- lib/jwt/encoded_token.rb
|
134
162
|
- lib/jwt/error.rb
|
135
163
|
- lib/jwt/json.rb
|
136
164
|
- lib/jwt/jwa.rb
|
165
|
+
- lib/jwt/jwa/compat.rb
|
137
166
|
- lib/jwt/jwa/ecdsa.rb
|
138
167
|
- lib/jwt/jwa/eddsa.rb
|
139
168
|
- lib/jwt/jwa/hmac.rb
|
@@ -142,6 +171,7 @@ files:
|
|
142
171
|
- lib/jwt/jwa/none.rb
|
143
172
|
- lib/jwt/jwa/ps.rb
|
144
173
|
- lib/jwt/jwa/rsa.rb
|
174
|
+
- lib/jwt/jwa/signing_algorithm.rb
|
145
175
|
- lib/jwt/jwa/unsupported.rb
|
146
176
|
- lib/jwt/jwa/wrapper.rb
|
147
177
|
- lib/jwt/jwk.rb
|
@@ -154,6 +184,7 @@ files:
|
|
154
184
|
- lib/jwt/jwk/rsa.rb
|
155
185
|
- lib/jwt/jwk/set.rb
|
156
186
|
- lib/jwt/jwk/thumbprint.rb
|
187
|
+
- lib/jwt/token.rb
|
157
188
|
- lib/jwt/verify.rb
|
158
189
|
- lib/jwt/version.rb
|
159
190
|
- lib/jwt/x5c_key_finder.rb
|
@@ -163,9 +194,8 @@ licenses:
|
|
163
194
|
- MIT
|
164
195
|
metadata:
|
165
196
|
bug_tracker_uri: https://github.com/jwt/ruby-jwt/issues
|
166
|
-
changelog_uri: https://github.com/jwt/ruby-jwt/blob/v2.
|
197
|
+
changelog_uri: https://github.com/jwt/ruby-jwt/blob/v2.10.2/CHANGELOG.md
|
167
198
|
rubygems_mfa_required: 'true'
|
168
|
-
post_install_message:
|
169
199
|
rdoc_options: []
|
170
200
|
require_paths:
|
171
201
|
- lib
|
@@ -180,8 +210,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
180
210
|
- !ruby/object:Gem::Version
|
181
211
|
version: '0'
|
182
212
|
requirements: []
|
183
|
-
rubygems_version: 3.
|
184
|
-
signing_key:
|
213
|
+
rubygems_version: 3.6.7
|
185
214
|
specification_version: 4
|
186
215
|
summary: JSON Web Token implementation in Ruby
|
187
216
|
test_files: []
|