Package codes.grow.packages.vault
Record Class TokenInfo
java.lang.Object
java.lang.Record
codes.grow.packages.vault.TokenInfo
- Record Components:
id- the token itself (redacted)accessor- token accessorpolicies- policiesttl- remaining TTL (zero = never expires)creationTtl- TTL at creationcreationTime- creation timeexpireTime- expiry timeissueTime- issue timerenewable- whether the token can be reneweddisplayName- display name (token-<name>)meta- token metadatanumUses- remaining uses (0 = unlimited)orphan- whether the token has no parentpath- creation path, e.g.auth/approle/logintype-serviceorbatchexplicitMaxTtl- explicit maximum TTLentityId- identity entity id
public record TokenInfo(Secret id, Optional<Secret> accessor, List<String> policies, Duration ttl, Duration creationTtl, Optional<Instant> creationTime, Optional<Instant> expireTime, Optional<Instant> issueTime, boolean renewable, String displayName, Map<String,String> meta, int numUses, boolean orphan, String path, String type, Duration explicitMaxTtl, String entityId)
extends Record
Properties of a token (
auth/token/lookup-self).-
Constructor Summary
ConstructorsConstructorDescriptionTokenInfo(Secret id, Optional<Secret> accessor, List<String> policies, Duration ttl, Duration creationTtl, Optional<Instant> creationTime, Optional<Instant> expireTime, Optional<Instant> issueTime, boolean renewable, String displayName, Map<String, String> meta, int numUses, boolean orphan, String path, String type, Duration explicitMaxTtl, String entityId) Creates the record; collections are copied. -
Method Summary
Modifier and TypeMethodDescriptionaccessor()Returns the value of theaccessorrecord component.Returns the value of thecreationTimerecord component.Returns the value of thecreationTtlrecord component.Returns the value of thedisplayNamerecord component.entityId()Returns the value of theentityIdrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexpireTimerecord component.Returns the value of theexplicitMaxTtlrecord component.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.Returns the value of theissueTimerecord component.meta()Returns the value of themetarecord component.intnumUses()Returns the value of thenumUsesrecord component.booleanorphan()Returns the value of theorphanrecord component.path()Returns the value of thepathrecord component.policies()Returns the value of thepoliciesrecord component.booleanReturns the value of therenewablerecord component.final StringtoString()Returns a string representation of this record class.ttl()Returns the value of thettlrecord component.type()Returns the value of thetyperecord component.
-
Constructor Details
-
TokenInfo
public TokenInfo(Secret id, Optional<Secret> accessor, List<String> policies, Duration ttl, Duration creationTtl, Optional<Instant> creationTime, Optional<Instant> expireTime, Optional<Instant> issueTime, boolean renewable, String displayName, Map<String, String> meta, int numUses, boolean orphan, String path, String type, Duration explicitMaxTtl, String entityId) Creates the record; collections are copied.- Parameters:
id- tokenaccessor- accessorpolicies- policiesttl- TTLcreationTtl- creation TTLcreationTime- creation timeexpireTime- expiry timeissueTime- issue timerenewable- renewable flagdisplayName- display namemeta- metadatanumUses- remaining usesorphan- orphan flagpath- creation pathtype- token typeexplicitMaxTtl- explicit max TTLentityId- entity id
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
accessor
Returns the value of theaccessorrecord component.- Returns:
- the value of the
accessorrecord component
-
policies
Returns the value of thepoliciesrecord component.- Returns:
- the value of the
policiesrecord component
-
ttl
Returns the value of thettlrecord component.- Returns:
- the value of the
ttlrecord component
-
creationTtl
Returns the value of thecreationTtlrecord component.- Returns:
- the value of the
creationTtlrecord component
-
creationTime
Returns the value of thecreationTimerecord component.- Returns:
- the value of the
creationTimerecord component
-
expireTime
Returns the value of theexpireTimerecord component.- Returns:
- the value of the
expireTimerecord component
-
issueTime
Returns the value of theissueTimerecord component.- Returns:
- the value of the
issueTimerecord component
-
renewable
public boolean renewable()Returns the value of therenewablerecord component.- Returns:
- the value of the
renewablerecord component
-
displayName
Returns the value of thedisplayNamerecord component.- Returns:
- the value of the
displayNamerecord component
-
meta
Returns the value of themetarecord component.- Returns:
- the value of the
metarecord component
-
numUses
public int numUses()Returns the value of thenumUsesrecord component.- Returns:
- the value of the
numUsesrecord component
-
orphan
public boolean orphan()Returns the value of theorphanrecord component.- Returns:
- the value of the
orphanrecord component
-
path
Returns the value of thepathrecord component.- Returns:
- the value of the
pathrecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
explicitMaxTtl
Returns the value of theexplicitMaxTtlrecord component.- Returns:
- the value of the
explicitMaxTtlrecord component
-
entityId
Returns the value of theentityIdrecord component.- Returns:
- the value of the
entityIdrecord component
-