forked from jwt/ruby-jwt
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherror.rb
More file actions
81 lines (57 loc) · 3.41 KB
/
Copy patherror.rb
File metadata and controls
81 lines (57 loc) · 3.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# frozen_string_literal: true
module JWT
# The base error class for all JWT errors.
class Error < StandardError; end
# The EncodeError class is raised when there is an error encoding a JWT.
class EncodeError < Error; end
# The historical grouping of every error that is not an encoding error. Every
# error class below is a descendant, so `rescue JWT::DecodeError` keeps its
# original meaning.
#
# @deprecated Use {JWT::Error}, {JWT::TokenError} or a more specific error class instead.
class DecodeError < Error; end
# The TokenError class is the base class for all errors related to token processing.
class TokenError < DecodeError; end
# The MalformedTokenError class is raised when the token is structurally invalid.
class MalformedTokenError < TokenError; end
# The Base64DecodeError class is raised when there is an error decoding a Base64-encoded string.
class Base64DecodeError < MalformedTokenError; end
# The SignatureError class is the base class for signature and algorithm related errors.
class SignatureError < TokenError; end
# The VerificationError class is raised when the signature of a token does not
# match the one calculated from the signing input.
class VerificationError < SignatureError; end
# The VerificationKeyError class is raised when the key or algorithm given for
# verification cannot be used, as opposed to a signature that does not match.
class VerificationKeyError < VerificationError; end
# The IncorrectAlgorithm class is raised when the JWT algorithm is incorrect.
class IncorrectAlgorithm < SignatureError; end
# The UnsupportedEcdsaCurve class is raised when the ECDSA curve is unsupported.
class UnsupportedEcdsaCurve < IncorrectAlgorithm; end
# The ClaimValidationError class is the base class for all claim validation errors.
class ClaimValidationError < TokenError; end
# The ExpiredSignature class is raised when the JWT token has expired.
class ExpiredSignature < ClaimValidationError; end
# The ImmatureSignature class is raised when the JWT token is not yet valid (nbf).
class ImmatureSignature < ClaimValidationError; end
# The InvalidIssuerError class is raised when the JWT issuer is invalid.
class InvalidIssuerError < ClaimValidationError; end
# The InvalidIatError class is raised when the JWT issued at (iat) claim is invalid.
class InvalidIatError < ClaimValidationError; end
# The InvalidAudError class is raised when the JWT audience (aud) claim is invalid.
class InvalidAudError < ClaimValidationError; end
# The InvalidSubError class is raised when the JWT subject (sub) claim is invalid.
class InvalidSubError < ClaimValidationError; end
# The InvalidCritError class is raised when the JWT crit header is invalid.
class InvalidCritError < ClaimValidationError; end
# The InvalidJtiError class is raised when the JWT ID (jti) claim is invalid.
class InvalidJtiError < ClaimValidationError; end
# The InvalidPayload class is raised when the JWT payload is invalid.
class InvalidPayload < ClaimValidationError; end
# The MissingRequiredClaim class is raised when a required claim is missing from the JWT.
class MissingRequiredClaim < ClaimValidationError; end
# The JWKError class is raised when there is an error with the JSON Web Key (JWK).
class JWKError < DecodeError; end
# Raised when a JWK uses a key type (kty) that this library does not support.
class UnsupportedKeyType < JWKError; end
end