Module: Clickwrap::Reference
- Defined in:
- lib/clickwrap/reference.rb
Overview
One normalization path for every stable reference Clickwrap writes or
queries. Keeping this in one place is security-relevant: a capture written
under a GlobalID must not become unreachable because a lifecycle or actor
proxy later queried the same tenant with to_s.
Class Method Summary collapse
- .actor(actor) ⇒ Object
- .record(record) ⇒ Object
- .represented_party(represented_party) ⇒ Object
- .subject(subject) ⇒ Object
- .tenant(tenant) ⇒ Object
Class Method Details
.actor(actor) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/clickwrap/reference.rb', line 10 def actor(actor) return nil if actor.nil? return actor.to_s if actor.is_a?(String) || actor.is_a?(Symbol) Clickwrap.config.identify_actor_with.call(actor).to_s end |
.record(record) ⇒ Object
29 30 31 |
# File 'lib/clickwrap/reference.rb', line 29 def record(record) stable(record) end |
.represented_party(represented_party) ⇒ Object
25 26 27 |
# File 'lib/clickwrap/reference.rb', line 25 def represented_party(represented_party) stable(represented_party) end |
.subject(subject) ⇒ Object
21 22 23 |
# File 'lib/clickwrap/reference.rb', line 21 def subject(subject) stable(subject) end |
.tenant(tenant) ⇒ Object
17 18 19 |
# File 'lib/clickwrap/reference.rb', line 17 def tenant(tenant) stable(tenant) end |