lib/fernet/verifier.rb in fernet-2.0 vs lib/fernet/verifier.rb in fernet-2.1
- old
+ new
@@ -1,14 +1,15 @@
#encoding UTF-8
require 'base64'
require 'openssl'
require 'date'
+require_relative 'errors'
module Fernet
# Public: verifies Fernet Tokens
class Verifier
- class UnknownTokenVersion < RuntimeError; end
+ class UnknownTokenVersion < Fernet::Error; end
attr_reader :token
attr_accessor :ttl, :enforce_ttl
# Internal: initializes a Verifier
@@ -40,10 +41,10 @@
@token.message
end
# Deprecated: returns the token's message
def data
- puts "[WARNING] data is deprected. Use message instead"
+ puts "[WARNING] data is deprecated. Use message instead"
message
end
# Public: String representation of this verifier, masks the secret to avoid
# leaks