Class CachingVaultTokenSupplier
java.lang.Object
org.springframework.vault.authentication.CachingVaultTokenSupplier
- All Implemented Interfaces:
ReactiveSessionManager
,VaultTokenSupplier
public class CachingVaultTokenSupplier
extends Object
implements VaultTokenSupplier, ReactiveSessionManager
Default implementation of
VaultTokenSupplier
caching the VaultToken
from a delegate VaultTokenSupplier
.- Since:
- 2.0
- Author:
- Mark Paluch
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturn aVaultToken
.static CachingVaultTokenSupplier
of
(VaultTokenSupplier delegate) Creates a newCachingVaultTokenSupplier
given adelegate supplier
.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.authentication.ReactiveSessionManager
getSessionToken
-
Method Details
-
of
Creates a newCachingVaultTokenSupplier
given adelegate supplier
.- Parameters:
delegate
- must not be null.- Returns:
- the
CachingVaultTokenSupplier
for adelegate supplier
.
-
getVaultToken
Description copied from interface:VaultTokenSupplier
Return aVaultToken
. This can declare a Vault login flow to obtain atoken
.- Specified by:
getVaultToken
in interfaceVaultTokenSupplier
- Returns:
- a
Mono
with theVaultToken
. - Throws:
VaultException
-