Package codes.grow.packages.vault
Record Class AuthInfo
java.lang.Object
java.lang.Record
codes.grow.packages.vault.AuthInfo
- Record Components:
clientToken- the client tokenaccessor- token accessor, when returnedpolicies- all policies of the tokentokenPolicies- policies attached to the token itselfmetadata- auth metadata (e.g.role_name,username)leaseDuration- token TTL (zero = never expires)renewable- whether the token can be renewedentityId- identity entity idtokenType-serviceorbatchorphan- whether the token has no parentnumUses- remaining uses (0 = unlimited)
public record AuthInfo(Secret clientToken, Optional<Secret> accessor, List<String> policies, List<String> tokenPolicies, Map<String,String> metadata, Duration leaseDuration, boolean renewable, String entityId, String tokenType, boolean orphan, int numUses)
extends Record
The
auth block of a login, token creation or renewal. Tokens are Secrets and
never printed.-
Constructor Summary
ConstructorsConstructorDescriptionAuthInfo(Secret clientToken, Optional<Secret> accessor, List<String> policies, List<String> tokenPolicies, Map<String, String> metadata, Duration leaseDuration, boolean renewable, String entityId, String tokenType, boolean orphan, int numUses) Creates the record; collections are copied. -
Method Summary
Modifier and TypeMethodDescriptionaccessor()Returns the value of theaccessorrecord component.Returns the value of theclientTokenrecord component.entityId()Returns the value of theentityIdrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theleaseDurationrecord component.metadata()Returns the value of themetadatarecord component.intnumUses()Returns the value of thenumUsesrecord component.booleanorphan()Returns the value of theorphanrecord component.policies()Returns the value of thepoliciesrecord component.booleanReturns the value of therenewablerecord component.Returns the value of thetokenPoliciesrecord component.Returns the value of thetokenTyperecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AuthInfo
public AuthInfo(Secret clientToken, Optional<Secret> accessor, List<String> policies, List<String> tokenPolicies, Map<String, String> metadata, Duration leaseDuration, boolean renewable, String entityId, String tokenType, boolean orphan, int numUses) Creates the record; collections are copied.- Parameters:
clientToken- tokenaccessor- accessorpolicies- policiestokenPolicies- token policiesmetadata- metadataleaseDuration- TTLrenewable- renewable flagentityId- entity idtokenType- token typeorphan- orphan flagnumUses- remaining uses
-
-
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 '=='. -
clientToken
Returns the value of theclientTokenrecord component.- Returns:
- the value of the
clientTokenrecord 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
-
tokenPolicies
Returns the value of thetokenPoliciesrecord component.- Returns:
- the value of the
tokenPoliciesrecord component
-
metadata
Returns the value of themetadatarecord component.- Returns:
- the value of the
metadatarecord component
-
leaseDuration
Returns the value of theleaseDurationrecord component.- Returns:
- the value of the
leaseDurationrecord component
-
renewable
public boolean renewable()Returns the value of therenewablerecord component.- Returns:
- the value of the
renewablerecord component
-
entityId
Returns the value of theentityIdrecord component.- Returns:
- the value of the
entityIdrecord component
-
tokenType
Returns the value of thetokenTyperecord component.- Returns:
- the value of the
tokenTyperecord component
-
orphan
public boolean orphan()Returns the value of theorphanrecord component.- Returns:
- the value of the
orphanrecord component
-
numUses
public int numUses()Returns the value of thenumUsesrecord component.- Returns:
- the value of the
numUsesrecord component
-