Module: JWT::Claims::VerificationMethods - Private +
Overview
- This module is part of a private API. - You should avoid using this module if possible, as it may be removed or be changed in the future. -
+ +Provides methods to verify the claims of a token.
- private
+
-
+
+Returns the errors of the claims of the token.
+
Returns the errors of the claims of the token.
+
- private
+
-
+
+Returns whether the claims of the token are valid.
+
@@ -174,10 +176,12 @@
- private
+
-
+
+Verifies the claims of the token.
+
@@ -194,7 +198,7 @@ Instance Method Details
- #claim_errors(*options) ⇒ Object
+ #claim_errors(*options) ⇒ Array<Symbol>
@@ -202,16 +206,52 @@
-
- This method is part of a private API.
- You should avoid using this method if possible, as it may be removed or be changed in the future.
-
+
+Returns the errors of the claims of the token.
@@ -219,12 +259,12 @@
-11
-12
-13
+17
+18
+19
- # File 'lib/jwt/claims/verification_methods.rb', line 11
+ # File 'lib/jwt/claims/verification_methods.rb', line 17
def claim_errors(*)
Verifier.errors(self, *)
@@ -245,16 +285,34 @@
-
- This method is part of a private API.
- You should avoid using this method if possible, as it may be removed or be changed in the future.
-
+
+Returns whether the claims of the token are valid.
- # File 'lib/jwt/claims/verification_methods.rb', line 15
+ # File 'lib/jwt/claims/verification_methods.rb', line 24
def valid_claims?(*)
claim_errors(*).empty?
@@ -301,16 +364,52 @@
-
- This method is part of a private API.
- You should avoid using this method if possible, as it may be removed or be changed in the future.
-
+
+Verifies the claims of the token.
@@ -318,12 +417,12 @@
-7
-8
-9
+10
+11
+12
- # File 'lib/jwt/claims/verification_methods.rb', line 7
+ # File 'lib/jwt/claims/verification_methods.rb', line 10
def verify_claims!(*)
Verifier.verify!(self, *)
@@ -338,7 +437,7 @@
Direct Known Subclasses
diff --git a/JWT/Deprecations.html b/JWT/Deprecations.html
index 9fdce555..c2c774f7 100644
--- a/JWT/Deprecations.html
+++ b/JWT/Deprecations.html
@@ -415,7 +415,7 @@
Overview
diff --git a/JWT/EncodedToken.html b/JWT/EncodedToken.html
index 2c8bf33e..2e2d8611 100644
--- a/JWT/EncodedToken.html
+++ b/JWT/EncodedToken.html
@@ -404,6 +404,30 @@
diff --git a/JWT/EncodeError.html b/JWT/EncodeError.html
index c5f2191c..2f4c43b4 100644
--- a/JWT/EncodeError.html
+++ b/JWT/EncodeError.html
@@ -125,7 +125,7 @@
diff --git a/JWT/Encode.html b/JWT/Encode.html
index 2ea4ecb0..9862ecfd 100644
--- a/JWT/Encode.html
+++ b/JWT/Encode.html
@@ -382,7 +382,7 @@
diff --git a/JWT/DecodeError.html b/JWT/DecodeError.html
index 2a9ed18f..bd67eaea 100644
--- a/JWT/DecodeError.html
+++ b/JWT/DecodeError.html
@@ -129,7 +129,7 @@
diff --git a/JWT/Decode.html b/JWT/Decode.html
index 6af0f5b0..2947c5ca 100644
--- a/JWT/Decode.html
+++ b/JWT/Decode.html
@@ -423,7 +423,7 @@
diff --git a/JWT/Configuration/JwkConfiguration.html b/JWT/Configuration/JwkConfiguration.html
index ec4d1d50..d732bd81 100644
--- a/JWT/Configuration/JwkConfiguration.html
+++ b/JWT/Configuration/JwkConfiguration.html
@@ -375,7 +375,7 @@
diff --git a/JWT/Configuration/DecodeConfiguration.html b/JWT/Configuration/DecodeConfiguration.html
index b2ed22de..cbe58e24 100644
--- a/JWT/Configuration/DecodeConfiguration.html
+++ b/JWT/Configuration/DecodeConfiguration.html
@@ -1331,7 +1331,7 @@
diff --git a/JWT/Configuration/Container.html b/JWT/Configuration/Container.html
index ff434b10..29deae11 100644
--- a/JWT/Configuration/Container.html
+++ b/JWT/Configuration/Container.html
@@ -619,7 +619,7 @@
diff --git a/JWT/Configuration.html b/JWT/Configuration.html
index 4f758186..864d7b2e 100644
--- a/JWT/Configuration.html
+++ b/JWT/Configuration.html
@@ -326,7 +326,7 @@
diff --git a/JWT/ClaimsValidator.html b/JWT/ClaimsValidator.html
index 5685cd5e..dfad1212 100644
--- a/JWT/ClaimsValidator.html
+++ b/JWT/ClaimsValidator.html
@@ -284,7 +284,7 @@
diff --git a/JWT/Claims/Verifier.html b/JWT/Claims/Verifier.html
index c1e5a36c..4c9d8889 100644
--- a/JWT/Claims/Verifier.html
+++ b/JWT/Claims/Verifier.html
@@ -273,7 +273,7 @@ Checks if the signature of the JWT token is valid.
+
+
+
+
+
+
+ #verify!(signature:, claims: [:exp]) ⇒ nil
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Verifies the token signature and claims.
+
+
@@ -1109,16 +1133,16 @@
-98
-99
-100
-101
-102
-103
-104
+114
+115
+116
+117
+118
+119
+120
- # File 'lib/jwt/encoded_token.rb', line 98
+ # File 'lib/jwt/encoded_token.rb', line 114
def valid_signature?(algorithm:, key:)
Array(JWA.resolve_and_sort(algorithms: algorithm, preferred_algorithm: header['alg'])).any? do |algo|
@@ -1130,6 +1154,128 @@
+
+
+
+
+
+ #verify!(signature:, claims: [:exp]) ⇒ nil
+
+
+
+
+
+
+
+
+Verifies the token signature and claims. By default it verifies the ‘exp’ claim.
+
+
+
+
+
+
+
+
+
+
+85
+86
+87
+88
+89
+
+
+ # File 'lib/jwt/encoded_token.rb', line 85
+
+def verify!(signature:, claims: [:exp])
+ verify_signature!(**signature)
+ claims.is_a?(Array) ? verify_claims!(*claims) : verify_claims!(claims)
+ nil
+end
+
+
+
@@ -1259,18 +1405,18 @@
-83
-84
-85
-86
-87
-88
-89
-90
-91
+99
+100
+101
+102
+103
+104
+105
+106
+107
- # File 'lib/jwt/encoded_token.rb', line 83
+ # File 'lib/jwt/encoded_token.rb', line 99
def verify_signature!(algorithm:, key: nil, key_finder: nil)
raise ArgumentError, 'Provide either key or key_finder, not both or neither' if key.nil? == key_finder.nil?
@@ -1291,7 +1437,7 @@
Overview
diff --git a/JWT/ImmatureSignature.html b/JWT/ImmatureSignature.html
index aa1c74ee..f10aaa18 100644
--- a/JWT/ImmatureSignature.html
+++ b/JWT/ImmatureSignature.html
@@ -133,7 +133,7 @@ Overview
diff --git a/JWT/IncorrectAlgorithm.html b/JWT/IncorrectAlgorithm.html
index f01e8590..a5fedfe8 100644
--- a/JWT/IncorrectAlgorithm.html
+++ b/JWT/IncorrectAlgorithm.html
@@ -137,7 +137,7 @@ Direct Known Subclasses
diff --git a/JWT/InvalidAudError.html b/JWT/InvalidAudError.html
index 09ecf27e..5d9495df 100644
--- a/JWT/InvalidAudError.html
+++ b/JWT/InvalidAudError.html
@@ -133,7 +133,7 @@ Overview
diff --git a/JWT/InvalidCritError.html b/JWT/InvalidCritError.html
index 9ed4b95c..17cd51aa 100644
--- a/JWT/InvalidCritError.html
+++ b/JWT/InvalidCritError.html
@@ -133,7 +133,7 @@ Overview
diff --git a/JWT/InvalidIatError.html b/JWT/InvalidIatError.html
index ea52854c..41ddc9ed 100644
--- a/JWT/InvalidIatError.html
+++ b/JWT/InvalidIatError.html
@@ -133,7 +133,7 @@ Overview
diff --git a/JWT/InvalidIssuerError.html b/JWT/InvalidIssuerError.html
index acc72819..a6c5369d 100644
--- a/JWT/InvalidIssuerError.html
+++ b/JWT/InvalidIssuerError.html
@@ -133,7 +133,7 @@ Overview
diff --git a/JWT/InvalidJtiError.html b/JWT/InvalidJtiError.html
index a083a11d..46ac49b8 100644
--- a/JWT/InvalidJtiError.html
+++ b/JWT/InvalidJtiError.html
@@ -133,7 +133,7 @@ Overview
diff --git a/JWT/InvalidPayload.html b/JWT/InvalidPayload.html
index 2b6f4501..304162a7 100644
--- a/JWT/InvalidPayload.html
+++ b/JWT/InvalidPayload.html
@@ -133,7 +133,7 @@ Overview
diff --git a/JWT/InvalidSubError.html b/JWT/InvalidSubError.html
index 679ee6a4..c2d23145 100644
--- a/JWT/InvalidSubError.html
+++ b/JWT/InvalidSubError.html
@@ -133,7 +133,7 @@ Overview
diff --git a/JWT/JSON.html b/JWT/JSON.html
index c62c4d78..94095ae5 100644
--- a/JWT/JSON.html
+++ b/JWT/JSON.html
@@ -271,7 +271,7 @@
Overview
diff --git a/JWT/MissingRequiredClaim.html b/JWT/MissingRequiredClaim.html
index 6d77bda2..4c1d9a1f 100644
--- a/JWT/MissingRequiredClaim.html
+++ b/JWT/MissingRequiredClaim.html
@@ -133,7 +133,7 @@ Overview
diff --git a/JWT/RequiredDependencyError.html b/JWT/RequiredDependencyError.html
index 21d3c464..1705d0ea 100644
--- a/JWT/RequiredDependencyError.html
+++ b/JWT/RequiredDependencyError.html
@@ -125,7 +125,7 @@ Overview
diff --git a/JWT/Token.html b/JWT/Token.html
index ffbe417c..972eaead 100644
--- a/JWT/Token.html
+++ b/JWT/Token.html
@@ -1194,7 +1194,7 @@
Overview
diff --git a/JWT/VERSION.html b/JWT/VERSION.html
index 3efb6f6f..6341289f 100644
--- a/JWT/VERSION.html
+++ b/JWT/VERSION.html
@@ -209,7 +209,7 @@
Overview
diff --git a/JWT/Verify.html b/JWT/Verify.html
index a0e57dd7..3e915405 100644
--- a/JWT/Verify.html
+++ b/JWT/Verify.html
@@ -297,7 +297,7 @@
Namespace Listing A-Z
diff --git a/file.README.html b/file.README.html
index 7eb7a059..eec07349 100644
--- a/file.README.html
+++ b/file.README.html
@@ -410,6 +410,15 @@ JWT::Token
and JWT::E
encoded_token.header # {'kid'=>'hmac', 'alg'=>'HS256'}
diff --git a/_index.html b/_index.html
index d91e7fe2..04f5b4ba 100644
--- a/_index.html
+++ b/_index.html
@@ -787,7 +787,7 @@
diff --git a/JWT/X5cKeyFinder.html b/JWT/X5cKeyFinder.html
index f5165e10..d39ea6af 100644
--- a/JWT/X5cKeyFinder.html
+++ b/JWT/X5cKeyFinder.html
@@ -303,7 +303,7 @@
diff --git a/JWT/VerificationError.html b/JWT/VerificationError.html
index a2c61e43..b786d481 100644
--- a/JWT/VerificationError.html
+++ b/JWT/VerificationError.html
@@ -133,7 +133,7 @@
diff --git a/JWT/UnsupportedEcdsaCurve.html b/JWT/UnsupportedEcdsaCurve.html
index e9ba26bd..80058bec 100644
--- a/JWT/UnsupportedEcdsaCurve.html
+++ b/JWT/UnsupportedEcdsaCurve.html
@@ -141,7 +141,7 @@
diff --git a/JWT/JWKError.html b/JWT/JWKError.html
index 988a1969..aa0e0c5b 100644
--- a/JWT/JWKError.html
+++ b/JWT/JWKError.html
@@ -133,7 +133,7 @@
diff --git a/JWT/JWK/Thumbprint.html b/JWT/JWK/Thumbprint.html
index 89126502..e6816f7b 100644
--- a/JWT/JWK/Thumbprint.html
+++ b/JWT/JWK/Thumbprint.html
@@ -362,7 +362,7 @@
diff --git a/JWT/JWK/Set.html b/JWT/JWK/Set.html
index 5a26c406..4c4551e2 100644
--- a/JWT/JWK/Set.html
+++ b/JWT/JWK/Set.html
@@ -784,7 +784,7 @@
diff --git a/JWT/JWK/RSA.html b/JWT/JWK/RSA.html
index 80c2798a..95fa2894 100644
--- a/JWT/JWK/RSA.html
+++ b/JWT/JWK/RSA.html
@@ -1278,7 +1278,7 @@
diff --git a/JWT/JWK/OKPRbNaCl.html b/JWT/JWK/OKPRbNaCl.html
index ec4ab443..2db21146 100644
--- a/JWT/JWK/OKPRbNaCl.html
+++ b/JWT/JWK/OKPRbNaCl.html
@@ -685,7 +685,7 @@
diff --git a/JWT/JWK/KidAsKeyDigest.html b/JWT/JWK/KidAsKeyDigest.html
index f3d845fd..33b30950 100644
--- a/JWT/JWK/KidAsKeyDigest.html
+++ b/JWT/JWK/KidAsKeyDigest.html
@@ -281,7 +281,7 @@
diff --git a/JWT/JWK/KeyFinder.html b/JWT/JWK/KeyFinder.html
index dbd7070c..e1ca461a 100644
--- a/JWT/JWK/KeyFinder.html
+++ b/JWT/JWK/KeyFinder.html
@@ -324,7 +324,7 @@
diff --git a/JWT/JWK/KeyBase.html b/JWT/JWK/KeyBase.html
index 3ccbda8f..58c3aaee 100644
--- a/JWT/JWK/KeyBase.html
+++ b/JWT/JWK/KeyBase.html
@@ -623,7 +623,7 @@
diff --git a/JWT/JWK/HMAC.html b/JWT/JWK/HMAC.html
index 5b2eeccc..b975b7c6 100644
--- a/JWT/JWK/HMAC.html
+++ b/JWT/JWK/HMAC.html
@@ -883,7 +883,7 @@
diff --git a/JWT/JWK/EC.html b/JWT/JWK/EC.html
index 17f0deb2..e50e08ef 100644
--- a/JWT/JWK/EC.html
+++ b/JWT/JWK/EC.html
@@ -963,7 +963,7 @@
diff --git a/JWT/JWK.html b/JWT/JWK.html
index 9c956869..cefac2d9 100644
--- a/JWT/JWK.html
+++ b/JWT/JWK.html
@@ -269,7 +269,7 @@
diff --git a/JWT/JWA/Wrapper.html b/JWT/JWA/Wrapper.html
index 1b040f44..e96ab31e 100644
--- a/JWT/JWA/Wrapper.html
+++ b/JWT/JWA/Wrapper.html
@@ -590,7 +590,7 @@
diff --git a/JWT/JWA/Unsupported.html b/JWT/JWA/Unsupported.html
index 65fc9430..807833ae 100644
--- a/JWT/JWA/Unsupported.html
+++ b/JWT/JWA/Unsupported.html
@@ -270,7 +270,7 @@
diff --git a/JWT/JWA/SigningAlgorithm/ClassMethods.html b/JWT/JWA/SigningAlgorithm/ClassMethods.html
index 8af985ce..f9e04ea0 100644
--- a/JWT/JWA/SigningAlgorithm/ClassMethods.html
+++ b/JWT/JWA/SigningAlgorithm/ClassMethods.html
@@ -175,7 +175,7 @@
diff --git a/JWT/JWA/SigningAlgorithm.html b/JWT/JWA/SigningAlgorithm.html
index cecbe9be..a3a25c1f 100644
--- a/JWT/JWA/SigningAlgorithm.html
+++ b/JWT/JWA/SigningAlgorithm.html
@@ -623,7 +623,7 @@
diff --git a/JWT/JWA/Rsa.html b/JWT/JWA/Rsa.html
index 29982cee..400c75ea 100644
--- a/JWT/JWA/Rsa.html
+++ b/JWT/JWA/Rsa.html
@@ -345,7 +345,7 @@
diff --git a/JWT/JWA/Ps.html b/JWT/JWA/Ps.html
index f4dacd73..267a0137 100644
--- a/JWT/JWA/Ps.html
+++ b/JWT/JWA/Ps.html
@@ -345,7 +345,7 @@
diff --git a/JWT/JWA/None.html b/JWT/JWA/None.html
index 7d5eada8..44a467ee 100644
--- a/JWT/JWA/None.html
+++ b/JWT/JWA/None.html
@@ -335,7 +335,7 @@
diff --git a/JWT/JWA/HmacRbNaClFixed.html b/JWT/JWA/HmacRbNaClFixed.html
index 8288ec5a..31571cde 100644
--- a/JWT/JWA/HmacRbNaClFixed.html
+++ b/JWT/JWA/HmacRbNaClFixed.html
@@ -446,7 +446,7 @@
diff --git a/JWT/JWA/HmacRbNaCl.html b/JWT/JWA/HmacRbNaCl.html
index 833c2e1c..11d56ace 100644
--- a/JWT/JWA/HmacRbNaCl.html
+++ b/JWT/JWA/HmacRbNaCl.html
@@ -412,7 +412,7 @@
diff --git a/JWT/JWA/Hmac/SecurityUtils.html b/JWT/JWA/Hmac/SecurityUtils.html
index b5a977d2..9947e8c3 100644
--- a/JWT/JWA/Hmac/SecurityUtils.html
+++ b/JWT/JWA/Hmac/SecurityUtils.html
@@ -268,7 +268,7 @@
diff --git a/JWT/JWA/Hmac.html b/JWT/JWA/Hmac.html
index 0b852fb8..2d34e7f1 100644
--- a/JWT/JWA/Hmac.html
+++ b/JWT/JWA/Hmac.html
@@ -428,7 +428,7 @@
diff --git a/JWT/JWA/Eddsa.html b/JWT/JWA/Eddsa.html
index 890b6d7f..77fc6efc 100644
--- a/JWT/JWA/Eddsa.html
+++ b/JWT/JWA/Eddsa.html
@@ -355,7 +355,7 @@
diff --git a/JWT/JWA/Ecdsa.html b/JWT/JWA/Ecdsa.html
index 45b1cd6e..c679da89 100644
--- a/JWT/JWA/Ecdsa.html
+++ b/JWT/JWA/Ecdsa.html
@@ -539,7 +539,7 @@
diff --git a/JWT/JWA/Compat/ClassMethods.html b/JWT/JWA/Compat/ClassMethods.html
index ee7c33a7..a15b8765 100644
--- a/JWT/JWA/Compat/ClassMethods.html
+++ b/JWT/JWA/Compat/ClassMethods.html
@@ -328,7 +328,7 @@
diff --git a/JWT/JWA/Compat.html b/JWT/JWA/Compat.html
index ecb94ec3..299cd9bb 100644
--- a/JWT/JWA/Compat.html
+++ b/JWT/JWA/Compat.html
@@ -202,7 +202,7 @@
diff --git a/JWT/JWA.html b/JWT/JWA.html
index 9b86d3a6..df0840b1 100644
--- a/JWT/JWA.html
+++ b/JWT/JWA.html
@@ -455,7 +455,7 @@
diff --git a/JWT/ExpiredSignature.html b/JWT/ExpiredSignature.html
index bc5959c6..37fa63e7 100644
--- a/JWT/ExpiredSignature.html
+++ b/JWT/ExpiredSignature.html
@@ -133,7 +133,7 @@
+The JWT::EncodedToken#verify!
method can be used to verify signature and claim verification in one go. The exp
claim is verified by default.
+
+encoded_token = JWT::EncodedToken.new(token.jwt)
+encoded_token.verify!(signature: {algorithm: 'HS256', key: "secret"})
+
+encoded_token.payload # => { 'exp'=>1234, 'jti'=>'1234", 'sub'=>'my-subject' }
+encoded_token.header # {'kid'=>'hmac', 'alg'=>'HS256'}
+
+
Detached payload
The ::JWT::Token#detach_payload!
method can be use to detach the payload from the JWT.
@@ -883,7 +892,7 @@ License
diff --git a/index.html b/index.html
index e4b64010..8560bc3c 100644
--- a/index.html
+++ b/index.html
@@ -410,6 +410,15 @@ JWT::Token
and JWT::E
encoded_token.header # {'kid'=>'hmac', 'alg'=>'HS256'}
+The JWT::EncodedToken#verify!
method can be used to verify signature and claim verification in one go. The exp
claim is verified by default.
+
+encoded_token = JWT::EncodedToken.new(token.jwt)
+encoded_token.verify!(signature: {algorithm: 'HS256', key: "secret"})
+
+encoded_token.payload # => { 'exp'=>1234, 'jti'=>'1234", 'sub'=>'my-subject' }
+encoded_token.header # {'kid'=>'hmac', 'alg'=>'HS256'}
+
+
Detached payload
The ::JWT::Token#detach_payload!
method can be use to detach the payload from the JWT.
@@ -883,7 +892,7 @@ License
diff --git a/method_list.html b/method_list.html
index e59209ca..f1e97c98 100644
--- a/method_list.html
+++ b/method_list.html
@@ -1728,6 +1728,14 @@ Method List
+
+ #verify!
+ JWT::EncodedToken
+
+
+
+
+
#verify!
JWT::Claims::Numeric::Compat
@@ -1735,7 +1743,7 @@ Method List
-
+
#verify!
JWT::Claims::Numeric
@@ -1743,7 +1751,7 @@ Method List
-
+
verify!
JWT::Claims::Numeric
@@ -1751,7 +1759,7 @@ Method List
-
+
#verify!
JWT::Claims::Subject
@@ -1759,7 +1767,7 @@ Method List
-
+
#verify!
JWT::Claims::Audience
@@ -1767,7 +1775,7 @@ Method List
-
+
#verify!
JWT::Claims::Required
@@ -1775,7 +1783,7 @@ Method List
-
+
verify!
JWT::Claims::Verifier
@@ -1783,7 +1791,7 @@ Method List
-
+
#verify!
JWT::Claims::IssuedAt
@@ -1791,7 +1799,7 @@ Method List
-
+
#verify!
JWT::Claims::Expiration
@@ -1799,7 +1807,7 @@ Method List
-
+
#verify!
JWT::Claims::NotBefore
@@ -1807,7 +1815,7 @@ Method List
-
+
verify!
JWT::Claims::DecodeVerifier
@@ -1815,7 +1823,7 @@ Method List
-
+
#verify_aud
JWT::Configuration::DecodeConfiguration
@@ -1823,7 +1831,7 @@ Method List
-
+
verify_claims
JWT::Verify
@@ -1831,7 +1839,7 @@ Method List
-
+
#verify_claims!
JWT::Claims::VerificationMethods
@@ -1839,7 +1847,7 @@ Method List
-
+
#verify_expiration
JWT::Configuration::DecodeConfiguration
@@ -1847,7 +1855,7 @@ Method List
-
+
#verify_iat
JWT::Configuration::DecodeConfiguration
@@ -1855,7 +1863,7 @@ Method List
-
+
#verify_iss
JWT::Configuration::DecodeConfiguration
@@ -1863,7 +1871,7 @@ Method List
-
+
#verify_jti
JWT::Configuration::DecodeConfiguration
@@ -1871,7 +1879,7 @@ Method List
-
+
#verify_key
JWT::JWK::EC
@@ -1879,7 +1887,7 @@ Method List
-
+
#verify_key
JWT::JWK::RSA
@@ -1887,7 +1895,7 @@ Method List
-
+
#verify_key
JWT::JWK::HMAC
@@ -1895,7 +1903,7 @@ Method List
-
+
#verify_key
JWT::JWK::OKPRbNaCl
@@ -1903,7 +1911,7 @@ Method List
-
+
#verify_not_before
JWT::Configuration::DecodeConfiguration
@@ -1911,7 +1919,7 @@ Method List
-
+
verify_payload!
JWT::Claims
@@ -1919,7 +1927,7 @@ Method List
-
+
#verify_signature!
JWT::EncodedToken
@@ -1927,7 +1935,7 @@ Method List
-
+
#verify_sub
JWT::Configuration::DecodeConfiguration
@@ -1935,7 +1943,7 @@ Method List
-
+
warning
JWT::Deprecations
diff --git a/top-level-namespace.html b/top-level-namespace.html
index c2d53a92..1caa46b2 100644
--- a/top-level-namespace.html
+++ b/top-level-namespace.html
@@ -100,7 +100,7 @@ Defined Under Namespace
Returns whether the claims of the token are valid.
+Verifies the claims of the token.
+Instance Method Details
- #claim_errors(*options) ⇒ Object
+ #claim_errors(*options) ⇒ Array<Symbol>
@@ -202,16 +206,52 @@
-
- This method is part of a private API.
- You should avoid using this method if possible, as it may be removed or be changed in the future.
-
+
+Returns the errors of the claims of the token.
- This method is part of a private API. - You should avoid using this method if possible, as it may be removed or be changed in the future. -
+ +Returns the errors of the claims of the token.
- # File 'lib/jwt/claims/verification_methods.rb', line 11 +# File 'lib/jwt/claims/verification_methods.rb', line 17 def claim_errors(*) Verifier.errors(self, *) @@ -245,16 +285,34 @@ |
- # File 'lib/jwt/claims/verification_methods.rb', line 15 +# File 'lib/jwt/claims/verification_methods.rb', line 24 def valid_claims?(*) claim_errors(*).empty? @@ -301,16 +364,52 @@
+
+ + #verify!(signature:, claims: [:exp]) ⇒ nil + + + + + +
+
+
+
+
+Verifies the token signature and claims. By default it verifies the ‘exp’ claim. + + +
@@ -1259,18 +1405,18 @@
|
- # File 'lib/jwt/encoded_token.rb', line 83 ++# File 'lib/jwt/encoded_token.rb', line 99 def verify_signature!(algorithm:, key: nil, key_finder: nil) raise ArgumentError, 'Provide either key or key_finder, not both or neither' if key.nil? == key_finder.nil? @@ -1291,7 +1437,7 @@+ The
+
Detached payloadThe Licensediff --git a/method_list.html b/method_list.html index e59209ca..f1e97c98 100644 --- a/method_list.html +++ b/method_list.html @@ -1728,6 +1728,14 @@Method List
+ #verify!
+ JWT::EncodedToken
+
+
#verify!
JWT::Claims::Numeric::Compat
@@ -1735,7 +1743,7 @@ Method List-
#verify!
JWT::Claims::Numeric
@@ -1743,7 +1751,7 @@ Method List-
verify!
JWT::Claims::Numeric
@@ -1751,7 +1759,7 @@ Method List-
#verify!
JWT::Claims::Subject
@@ -1759,7 +1767,7 @@ Method List-
#verify!
JWT::Claims::Audience
@@ -1767,7 +1775,7 @@ Method List-
#verify!
JWT::Claims::Required
@@ -1775,7 +1783,7 @@ Method List-
verify!
JWT::Claims::Verifier
@@ -1783,7 +1791,7 @@ Method List-
#verify!
JWT::Claims::IssuedAt
@@ -1791,7 +1799,7 @@ Method List-
#verify!
JWT::Claims::Expiration
@@ -1799,7 +1807,7 @@ Method List-
#verify!
JWT::Claims::NotBefore
@@ -1807,7 +1815,7 @@ Method List-
verify!
JWT::Claims::DecodeVerifier
@@ -1815,7 +1823,7 @@ Method List-
#verify_aud
JWT::Configuration::DecodeConfiguration
@@ -1823,7 +1831,7 @@ Method List-
verify_claims
JWT::Verify
@@ -1831,7 +1839,7 @@ Method List-
#verify_claims!
JWT::Claims::VerificationMethods
@@ -1839,7 +1847,7 @@ Method List-
#verify_expiration
JWT::Configuration::DecodeConfiguration
@@ -1847,7 +1855,7 @@ Method List-
#verify_iat
JWT::Configuration::DecodeConfiguration
@@ -1855,7 +1863,7 @@ Method List-
#verify_iss
JWT::Configuration::DecodeConfiguration
@@ -1863,7 +1871,7 @@ Method List-
#verify_jti
JWT::Configuration::DecodeConfiguration
@@ -1871,7 +1879,7 @@ Method List-
#verify_key
JWT::JWK::EC
@@ -1879,7 +1887,7 @@ Method List-
#verify_key
JWT::JWK::RSA
@@ -1887,7 +1895,7 @@ Method List-
#verify_key
JWT::JWK::HMAC
@@ -1895,7 +1903,7 @@ Method List-
#verify_key
JWT::JWK::OKPRbNaCl
@@ -1903,7 +1911,7 @@ Method List-
#verify_not_before
JWT::Configuration::DecodeConfiguration
@@ -1911,7 +1919,7 @@ Method List-
verify_payload!
JWT::Claims
@@ -1919,7 +1927,7 @@ Method List-
#verify_signature!
JWT::EncodedToken
@@ -1927,7 +1935,7 @@ Method List-
#verify_sub
JWT::Configuration::DecodeConfiguration
@@ -1935,7 +1943,7 @@ Method List-
warning
JWT::Deprecations
diff --git a/top-level-namespace.html b/top-level-namespace.html
index c2d53a92..1caa46b2 100644
--- a/top-level-namespace.html
+++ b/top-level-namespace.html
@@ -100,7 +100,7 @@
Defined Under Namespace |