Class: Cerbos::Input::RequestContext
- Inherits:
-
Object
- Object
- Cerbos::Input::RequestContext
- Defined in:
- lib/cerbos/input/request_context.rb
Overview
Metadata attached to a request.
Requires the Cerbos policy decision point server to be at least v0.51. This information will be captured in the audit logs if audit logging is enabled in the policy decision point server.
Instance Attribute Summary collapse
-
#annotations ⇒ Attributes
readonly
User-defined metadata.
Instance Method Summary collapse
-
#initialize(annotations: {}) ⇒ RequestContext
constructor
Specify metadata to attach to a request.
Constructor Details
#initialize(annotations: {}) ⇒ RequestContext
Specify metadata to attach to a request.
18 19 20 |
# File 'lib/cerbos/input/request_context.rb', line 18 def initialize(annotations: {}) @annotations = Input.coerce_required(annotations, Attributes) end |
Instance Attribute Details
#annotations ⇒ Attributes (readonly)
User-defined metadata.
13 14 15 |
# File 'lib/cerbos/input/request_context.rb', line 13 def annotations @annotations end |