Class Token


  • public final class Token
    extends Object
    Vault Token metamodel.
    Since:
    0.4.0
    Author:
    Stefan Kalscheuer
    • Constructor Detail

      • Token

        public Token()
        Construct empty Token object.
      • Token

        @Deprecated
        public Token​(String id,
                     String displayName,
                     Boolean noParent,
                     Boolean noDefaultPolicy,
                     Integer ttl,
                     Integer numUses,
                     List<String> policies,
                     Map<String,​String> meta,
                     Boolean renewable)
        Deprecated.
        As of 0.9 in favor of builder(). Will be removed with next major release.
        Construct complete Token object with default type.
        Parameters:
        id - Token ID (optional)
        displayName - Token display name (optional)
        noParent - Token has no parent (optional)
        noDefaultPolicy - Do not add default policy (optional)
        ttl - Token TTL in seconds (optional)
        numUses - Number of uses (optional)
        policies - List of policies (optional)
        meta - Metadata (optional)
        renewable - Is the token renewable (optional)
      • Token

        @Deprecated
        public Token​(String id,
                     String type,
                     String displayName,
                     Boolean noParent,
                     Boolean noDefaultPolicy,
                     Integer ttl,
                     Integer numUses,
                     List<String> policies,
                     Map<String,​String> meta,
                     Boolean renewable)
        Deprecated.
        As of 0.9 in favor of builder(). Will be removed with next major release.
        Construct complete Token object.
        Parameters:
        id - Token ID (optional)
        type - Token type (optional)
        displayName - Token display name (optional)
        noParent - Token has no parent (optional)
        noDefaultPolicy - Do not add default policy (optional)
        ttl - Token TTL in seconds (optional)
        numUses - Number of uses (optional)
        policies - List of policies (optional)
        meta - Metadata (optional)
        renewable - Is the token renewable (optional)
    • Method Detail

      • getId

        public String getId()
        Returns:
        Token ID
      • getType

        public String getType()
        Returns:
        Token type
        Since:
        0.9
      • getDisplayName

        public String getDisplayName()
        Returns:
        Token display name
      • getNoParent

        public Boolean getNoParent()
        Returns:
        Token has no parent
      • getNoDefaultPolicy

        public Boolean getNoDefaultPolicy()
        Returns:
        Token has no default policy
      • getTtl

        public Integer getTtl()
        Returns:
        Time-to-live in seconds
      • getExplicitMaxTtl

        public Integer getExplicitMaxTtl()
        Returns:
        Explicit maximum time-to-live in seconds
        Since:
        0.9
      • getNumUses

        public Integer getNumUses()
        Returns:
        Number of uses
      • getPolicies

        public List<String> getPolicies()
        Returns:
        List of policies
      • isRenewable

        public Boolean isRenewable()
        Returns:
        Token is renewable
      • getPeriod

        public Integer getPeriod()
        Returns:
        Token period.
        Since:
        0.9
      • getEntityAlias

        public String getEntityAlias()
        Returns:
        Token entity alias.
        Since:
        0.9