lib/fernet/verifier.rb in fernet-1.3 vs lib/fernet/verifier.rb in fernet-1.4
- old
+ new
@@ -23,10 +23,14 @@
custom_verification = yield self
else
custom_verification = true
end
- signatures_match? && token_recent_enough? && custom_verification
+ @valid = signatures_match? && token_recent_enough? && custom_verification
+ end
+
+ def valid?
+ @valid
end
def inspect
"#<Fernet::Verifier @secret=[masked] @token=#{@token} @data=#{@data.inspect} @ttl=#{@ttl}>"
end