Class: Keycard::Authentication::UserEid

Inherits:
Method
  • Object
show all
Defined in:
lib/keycard/authentication/user_eid.rb

Overview

Identity verification based on the user EID request attribute.

The EID will typically be present in single sign-on scenarios, where there is a proxy in place to set secure headers. The finder is expected to take one paramter, the user_eid itself.

Instance Method Summary collapse

Methods inherited from Method

bind, bind_class_method, #initialize

Constructor Details

This class inherits a constructor from Keycard::Authentication::Method

Instance Method Details

#applyObject



11
12
13
14
15
16
17
18
19
# File 'lib/keycard/authentication/user_eid.rb', line 11

def apply
  if user_eid.nil?
    skipped("No user_eid found in request attributes")
  elsif ( = finder.call(user_eid))
    succeeded(, "Account found for user_eid '#{user_eid}'")
  else
    failed("Account not found for user_eid '#{user_eid}'")
  end
end