Class: Cerbos::Input::JWT
- Inherits:
-
Object
- Object
- Cerbos::Input::JWT
- Defined in:
- lib/cerbos/input/jwt.rb
Overview
A JSON Web Token to use as an auxiliary data source, which will be verified against the Cerbos policy decision point (PDP) server's configured JSON Web Key Sets (JWKS) unless verification is disabled on the server.
Instance Attribute Summary collapse
-
#key_set_id ⇒ String?
readonly
The ID of the JWKS to be used by the PDP server to verify the JWT.
-
#token ⇒ String
readonly
The encoded JWT.
Instance Method Summary collapse
-
#initialize(token:, key_set_id: nil) ⇒ JWT
constructor
Specify a JWT to use as an auxiliary data source.
Constructor Details
#initialize(token:, key_set_id: nil) ⇒ JWT
Specify a JWT to use as an auxiliary data source.
24 25 26 27 |
# File 'lib/cerbos/input/jwt.rb', line 24 def initialize(token:, key_set_id: nil) @token = token @key_set_id = key_set_id end |
Instance Attribute Details
#key_set_id ⇒ String? (readonly)
The ID of the JWKS to be used by the PDP server to verify the JWT.
18 19 20 |
# File 'lib/cerbos/input/jwt.rb', line 18 def key_set_id @key_set_id end |
#token ⇒ String (readonly)
The encoded JWT.
12 13 14 |
# File 'lib/cerbos/input/jwt.rb', line 12 def token @token end |