Class: Cerbos::Input::AuxData

Inherits:
Object
  • Object
show all
Defined in:
lib/cerbos/input/aux_data.rb

Overview

Auxiliary data sources that can be referenced in policy conditions.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(jwt: nil) ⇒ AuxData

Specify auxiliary data sources.

Parameters:

  • jwt (JWT, Hash, nil) (defaults to: nil)

    a JSON Web Token (JWT) to use as an auxiliary data source.


16
17
18
# File 'lib/cerbos/input/aux_data.rb', line 16

def initialize(jwt: nil)
  @jwt = Input.coerce_optional(jwt, JWT)
end

Instance Attribute Details

#jwtJWT? (readonly)

A JSON Web Token (JWT) to use as an auxiliary data source.

Returns:

  • (JWT)
  • (nil)

    if not provided.


11
12
13
# File 'lib/cerbos/input/aux_data.rb', line 11

def jwt
  @jwt
end