Skip to content

Commit

Permalink
Merge pull request #357 from excpt/issue/335
Browse files Browse the repository at this point in the history
Fix 'already initialized constant JWT Error'
  • Loading branch information
anakinj committed Jul 7, 2020
2 parents 95d8d9f + 57258e4 commit f26eea6
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions lib/jwt/error.rb
@@ -1,20 +1,20 @@
# frozen_string_literal: true

module JWT
EncodeError = Class.new(StandardError)
DecodeError = Class.new(StandardError)
RequiredDependencyError = Class.new(StandardError)
class EncodeError < StandardError; end
class DecodeError < StandardError; end
class RequiredDependencyError < StandardError; end

VerificationError = Class.new(DecodeError)
ExpiredSignature = Class.new(DecodeError)
IncorrectAlgorithm = Class.new(DecodeError)
ImmatureSignature = Class.new(DecodeError)
InvalidIssuerError = Class.new(DecodeError)
InvalidIatError = Class.new(DecodeError)
InvalidAudError = Class.new(DecodeError)
InvalidSubError = Class.new(DecodeError)
InvalidJtiError = Class.new(DecodeError)
InvalidPayload = Class.new(DecodeError)
class VerificationError < DecodeError; end
class ExpiredSignature < DecodeError; end
class IncorrectAlgorithm < DecodeError; end
class ImmatureSignature < DecodeError; end
class InvalidIssuerError < DecodeError; end
class InvalidIatError < DecodeError; end
class InvalidAudError < DecodeError; end
class InvalidSubError < DecodeError; end
class InvalidJtiError < DecodeError; end
class InvalidPayload < DecodeError; end

JWKError = Class.new(DecodeError)
class JWKError < DecodeError; end
end

0 comments on commit f26eea6

Please sign in to comment.