Module: Clickwrap::SubjectFingerprint
- Defined in:
- lib/clickwrap/subject_fingerprint.rb
Overview
One implementation of the aggregate subject fingerprint used by presentation, remediation, capture, and verification. A security binding implemented four nearly-identical ways eventually becomes four different bindings; this is deliberately the only path.
Class Method Summary collapse
Class Method Details
.for(policy, subject) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/clickwrap/subject_fingerprint.rb', line 11 def for(policy, subject) fingerprints = policy.statements.filter_map do |statement| next unless statement.subject_bound? [statement.key, for_statement(statement, subject)] end.to_h fingerprints.empty? ? nil : Digest.digest_canonical(fingerprints) end |