Package org.springframework.vault.core
Class VaultTokenTemplate
java.lang.Object
org.springframework.vault.core.VaultTokenTemplate
- All Implemented Interfaces:
VaultTokenOperations
Default implementation of
VaultTokenOperations
.- Author:
- Mark Paluch, Nanne Baars
-
Constructor Summary
ConstructorDescriptionVaultTokenTemplate
(VaultOperations vaultOperations) Create a newVaultTokenTemplate
with the givenVaultOperations
. -
Method Summary
Modifier and TypeMethodDescriptioncreate
(String role, VaultTokenRequest request) Create a new token for the givenrole
andVaultTokenRequest
.create
(VaultTokenRequest request) Create a new token for the givenVaultTokenRequest
.createOrphan
(VaultTokenRequest request) Create a new orphan token for the givenVaultTokenRequest
.renew
(VaultToken vaultToken) Renew aVaultToken
.void
revoke
(VaultToken vaultToken) Revoke aVaultToken
.void
revokeOrphan
(VaultToken vaultToken) Revoke aVaultToken
but not its child tokens.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.vault.core.VaultTokenOperations
create, create, createOrphan
-
Constructor Details
-
VaultTokenTemplate
Create a newVaultTokenTemplate
with the givenVaultOperations
.- Parameters:
vaultOperations
- must not be null.
-
-
Method Details
-
create
Description copied from interface:VaultTokenOperations
Create a new token for the givenVaultTokenRequest
.- Specified by:
create
in interfaceVaultTokenOperations
- Parameters:
request
- must not be null.- Returns:
- a
VaultTokenResponse
- See Also:
-
create
Description copied from interface:VaultTokenOperations
Create a new token for the givenrole
andVaultTokenRequest
.- Specified by:
create
in interfaceVaultTokenOperations
- Parameters:
role
- must not be null or empty.request
- must not be null.- Returns:
- a
VaultTokenResponse
- Throws:
VaultException
- See Also:
-
createOrphan
Description copied from interface:VaultTokenOperations
Create a new orphan token for the givenVaultTokenRequest
.- Specified by:
createOrphan
in interfaceVaultTokenOperations
- Parameters:
request
- must not be null.- Returns:
- a
VaultTokenResponse
- See Also:
-
renew
Description copied from interface:VaultTokenOperations
Renew aVaultToken
.- Specified by:
renew
in interfaceVaultTokenOperations
- Parameters:
vaultToken
- must not be null.- Returns:
- a
VaultTokenResponse
- See Also:
-
revoke
Description copied from interface:VaultTokenOperations
Revoke aVaultToken
.- Specified by:
revoke
in interfaceVaultTokenOperations
- Parameters:
vaultToken
- must not be null.- See Also:
-
revokeOrphan
Description copied from interface:VaultTokenOperations
Revoke aVaultToken
but not its child tokens.- Specified by:
revokeOrphan
in interfaceVaultTokenOperations
- Parameters:
vaultToken
- must not be null.- See Also:
-