Class TokenResponse
- java.lang.Object
-
- io.helidon.integrations.common.rest.ApiJsonParser
-
- io.helidon.integrations.common.rest.ApiResponse
-
- io.helidon.integrations.common.rest.ApiEntityResponse
-
- io.helidon.integrations.vault.VaultResponse
-
- io.helidon.integrations.vault.auths.token.TokenResponse
-
- Direct Known Subclasses:
CreateToken.Response
,RenewToken.Response
public abstract class TokenResponse extends VaultResponse
Response returning a token.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.helidon.integrations.common.rest.ApiEntityResponse
ApiEntityResponse.Builder<B extends ApiEntityResponse.Builder<B,T,X>,T extends ApiEntityResponse,X>
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
TokenResponse(ApiEntityResponse.Builder<?,? extends VaultResponse,JsonObject> builder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
accessor()
Accessor.String
entityId()
Entity id.Map<String,String>
metadata()
Metadata.boolean
orphan()
Whether the token is orphan (no parent).List<String>
policies()
List of policy names.VaultToken
token()
Token that was received.List<String>
tokenPolicies()
List of token policy names.String
tokenType()
Type of the token.-
Methods inherited from class io.helidon.integrations.vault.VaultResponse
vaultRequestId
-
Methods inherited from class io.helidon.integrations.common.rest.ApiResponse
headers, requestId, status
-
Methods inherited from class io.helidon.integrations.common.rest.ApiJsonParser
isPresent, stringValue, toBoolean, toBytesBase64, toDouble, toInstant, toInt, toList, toLong, toMap, toObject, toString
-
-
-
-
Constructor Detail
-
TokenResponse
protected TokenResponse(ApiEntityResponse.Builder<?,? extends VaultResponse,JsonObject> builder)
-
-
Method Detail
-
token
public VaultToken token()
Token that was received.- Returns:
- the token
-
accessor
public String accessor()
Accessor.- Returns:
- accessor
-
tokenPolicies
public List<String> tokenPolicies()
List of token policy names.- Returns:
- token policies
-
metadata
public Map<String,String> metadata()
Metadata. When a token is created with metadata attached, it is available through this method.- Returns:
- key/values of metadata
-
entityId
public String entityId()
Entity id.- Returns:
- entity id
-
tokenType
public String tokenType()
Type of the token.- Returns:
- token type
- See Also:
TokenAuthRx.TYPE_SERVICE
,TokenAuthRx.TYPE_BATCH
-
orphan
public boolean orphan()
Whether the token is orphan (no parent).- Returns:
true
if orphan
-
-