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
ConstructorsConstructorDescriptionVaultTokenTemplate(VaultOperations vaultOperations) Create a newVaultTokenTemplatewith the givenVaultOperations. -
Method Summary
Modifier and TypeMethodDescriptioncreate(String role, VaultTokenRequest request) Create a new token for the givenroleandVaultTokenRequest.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.voidrevoke(VaultToken vaultToken) Revoke aVaultToken.voidrevokeOrphan(VaultToken vaultToken) Revoke aVaultTokenbut not its child tokens.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.vault.core.VaultTokenOperations
create, create, createOrphan
-
Constructor Details
-
VaultTokenTemplate
Create a newVaultTokenTemplatewith the givenVaultOperations.- Parameters:
vaultOperations- must not be null.
-
-
Method Details
-
create
Description copied from interface:VaultTokenOperationsCreate a new token for the givenVaultTokenRequest.- Specified by:
createin interfaceVaultTokenOperations- Parameters:
request- must not be null.- Returns:
- a
VaultTokenResponse - See Also:
-
create
Description copied from interface:VaultTokenOperationsCreate a new token for the givenroleandVaultTokenRequest.- Specified by:
createin 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:VaultTokenOperationsCreate a new orphan token for the givenVaultTokenRequest.- Specified by:
createOrphanin interfaceVaultTokenOperations- Parameters:
request- must not be null.- Returns:
- a
VaultTokenResponse - See Also:
-
renew
Description copied from interface:VaultTokenOperationsRenew aVaultToken.- Specified by:
renewin interfaceVaultTokenOperations- Parameters:
vaultToken- must not be null.- Returns:
- a
VaultTokenResponse - See Also:
-
revoke
Description copied from interface:VaultTokenOperationsRevoke aVaultToken.- Specified by:
revokein interfaceVaultTokenOperations- Parameters:
vaultToken- must not be null.- See Also:
-
revokeOrphan
Description copied from interface:VaultTokenOperationsRevoke aVaultTokenbut not its child tokens.- Specified by:
revokeOrphanin interfaceVaultTokenOperations- Parameters:
vaultToken- must not be null.- See Also:
-