Class: Legion::Crypt::Spiffe::JwtSvid
- Inherits:
-
Struct
- Object
- Struct
- Legion::Crypt::Spiffe::JwtSvid
- Defined in:
- lib/legion/crypt/spiffe.rb
Overview
Parsed JWT SVID.
Instance Attribute Summary collapse
-
#audience ⇒ Object
Returns the value of attribute audience.
-
#expiry ⇒ Object
Returns the value of attribute expiry.
-
#source ⇒ Object
Returns the value of attribute source.
-
#spiffe_id ⇒ Object
Returns the value of attribute spiffe_id.
-
#token ⇒ Object
Returns the value of attribute token.
Instance Method Summary collapse
Instance Attribute Details
#audience ⇒ Object
Returns the value of attribute audience
49 50 51 |
# File 'lib/legion/crypt/spiffe.rb', line 49 def audience @audience end |
#expiry ⇒ Object
Returns the value of attribute expiry
49 50 51 |
# File 'lib/legion/crypt/spiffe.rb', line 49 def expiry @expiry end |
#source ⇒ Object
Returns the value of attribute source
49 50 51 |
# File 'lib/legion/crypt/spiffe.rb', line 49 def source @source end |
#spiffe_id ⇒ Object
Returns the value of attribute spiffe_id
49 50 51 |
# File 'lib/legion/crypt/spiffe.rb', line 49 def spiffe_id @spiffe_id end |
#token ⇒ Object
Returns the value of attribute token
49 50 51 |
# File 'lib/legion/crypt/spiffe.rb', line 49 def token @token end |
Instance Method Details
#expired? ⇒ Boolean
50 51 52 |
# File 'lib/legion/crypt/spiffe.rb', line 50 def expired? Time.now >= expiry end |
#valid? ⇒ Boolean
54 55 56 |
# File 'lib/legion/crypt/spiffe.rb', line 54 def valid? !token.nil? && !expired? end |