Class: Legion::Crypt::Spiffe::JwtSvid

Inherits:
Struct
  • Object
show all
Defined in:
lib/legion/crypt/spiffe.rb

Overview

Parsed JWT SVID.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#audienceObject

Returns the value of attribute audience

Returns:

  • (Object)

    the current value of audience



49
50
51
# File 'lib/legion/crypt/spiffe.rb', line 49

def audience
  @audience
end

#expiryObject

Returns the value of attribute expiry

Returns:

  • (Object)

    the current value of expiry



49
50
51
# File 'lib/legion/crypt/spiffe.rb', line 49

def expiry
  @expiry
end

#sourceObject

Returns the value of attribute source

Returns:

  • (Object)

    the current value of source



49
50
51
# File 'lib/legion/crypt/spiffe.rb', line 49

def source
  @source
end

#spiffe_idObject

Returns the value of attribute spiffe_id

Returns:

  • (Object)

    the current value of spiffe_id



49
50
51
# File 'lib/legion/crypt/spiffe.rb', line 49

def spiffe_id
  @spiffe_id
end

#tokenObject

Returns the value of attribute token

Returns:

  • (Object)

    the current value of token



49
50
51
# File 'lib/legion/crypt/spiffe.rb', line 49

def token
  @token
end

Instance Method Details

#expired?Boolean

Returns:

  • (Boolean)


50
51
52
# File 'lib/legion/crypt/spiffe.rb', line 50

def expired?
  Time.now >= expiry
end

#valid?Boolean

Returns:

  • (Boolean)


54
55
56
# File 'lib/legion/crypt/spiffe.rb', line 54

def valid?
  !token.nil? && !expired?
end