Package org.springframework.vault.core
Interface VaultTokenOperations
- All Known Implementing Classes:
VaultTokenTemplate
public interface VaultTokenOperations
Interface that specifies token-related operations.
- Author:
- Mark Paluch, Nanne Baars
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault VaultTokenResponse
create()
Create a new token.default VaultTokenResponse
Create a new token for the givenrole
.create
(String role, VaultTokenRequest request) Create a new token for the givenrole
andVaultTokenRequest
.create
(VaultTokenRequest request) Create a new token for the givenVaultTokenRequest
.default VaultTokenResponse
Create a new orphan token.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.
-
Method Details
-
create
Create a new token.- Returns:
- a
VaultTokenResponse
- Throws:
VaultException
- See Also:
-
create
Create a new token for the givenVaultTokenRequest
.- Parameters:
request
- must not be null.- Returns:
- a
VaultTokenResponse
- Throws:
VaultException
- See Also:
-
create
Create a new token for the givenrole
.- Parameters:
role
- must not be null.- Returns:
- a
VaultTokenResponse
- Throws:
VaultException
- Since:
- 3.1
- See Also:
-
create
Create a new token for the givenrole
andVaultTokenRequest
.- Parameters:
role
- must not be null or empty.request
- must not be null.- Returns:
- a
VaultTokenResponse
- Throws:
VaultException
- Since:
- 3.1
- See Also:
-
createOrphan
Create a new orphan token.- Returns:
- a
VaultTokenResponse
- See Also:
-
createOrphan
Create a new orphan token for the givenVaultTokenRequest
.- Parameters:
request
- must not be null.- Returns:
- a
VaultTokenResponse
- See Also:
-
renew
Renew aVaultToken
.- Parameters:
vaultToken
- must not be null.- Returns:
- a
VaultTokenResponse
- See Also:
-
revoke
Revoke aVaultToken
.- Parameters:
vaultToken
- must not be null.- See Also:
-
revokeOrphan
Revoke aVaultToken
but not its child tokens.- Parameters:
vaultToken
- must not be null.- See Also:
-