lib/clarion/authn.rb in clarion-0.3.0 vs lib/clarion/authn.rb in clarion-1.0.0

- old
+ new

@@ -75,13 +75,19 @@ def key_for_handle(handle) keys.find { |_| _.handle == handle } end - def verify(key, verified_at: Time.now) - unless key_for_handle(key.handle) - return false + def verify_by_handle(handle, verified_at: Time.now) + key = key_for_handle(handle) + unless key + return nil end + verify(key) + return key + end + + def verify(key, verified_at: Time.now) @verified_at = verified_at @verified_key = key @status = :verified true end