Class Token
- java.lang.Object
-
- de.stklcode.jvault.connector.model.Token
-
public final class Token extends Object
Vault Token metamodel.- Since:
- 0.4.0
- Author:
- Stefan Kalscheuer
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Token.Builder
A builder for vault tokens.static class
Token.Type
Constants for token types.
-
Constructor Summary
Constructors Constructor Description Token()
Construct emptyToken
object.Token(Token.Builder builder)
ConstructToken
object fromToken.Builder
.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 ofbuilder()
.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 ofbuilder()
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Token.Builder
builder()
GetToken.Builder
instance.String
getDisplayName()
String
getEntityAlias()
Integer
getExplicitMaxTtl()
String
getId()
Map<String,String>
getMeta()
Boolean
getNoDefaultPolicy()
Boolean
getNoParent()
Integer
getNumUses()
Integer
getPeriod()
List<String>
getPolicies()
Integer
getTtl()
String
getType()
Boolean
isRenewable()
-
-
-
Constructor Detail
-
Token
public Token()
Construct emptyToken
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 ofbuilder()
. Will be removed with next major release.Construct completeToken
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 ofbuilder()
. Will be removed with next major release.Construct completeToken
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)
-
Token
public Token(Token.Builder builder)
ConstructToken
object fromToken.Builder
.- Parameters:
builder
- Token builder.
-
-
Method Detail
-
builder
public static Token.Builder builder()
GetToken.Builder
instance.- Returns:
- Token Builder.
- Since:
- 0.8
-
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
-
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
-
-