Package org.keycloak.vault
Class DefaultVaultStringSecret
- java.lang.Object
- 
- org.keycloak.vault.DefaultVaultStringSecret
 
- 
- All Implemented Interfaces:
- AutoCloseable,- VaultStringSecret
 
 public class DefaultVaultStringSecret extends Object implements VaultStringSecret DefaultVaultCharSecretimplementation based onString.- Author:
- Stefan Guilhen
 
- 
- 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Destroys the secret in memory by e.g.static VaultStringSecretforString(Optional<String> secret)Optional<String>get()Returns the secret represented as aString.
 
- 
- 
- 
Method Detail- 
forStringpublic static VaultStringSecret forString(Optional<String> secret) 
 - 
getpublic Optional<String> get() Description copied from interface:VaultStringSecretReturns the secret represented as aString.- Specified by:
- getin interface- VaultStringSecret
- Returns:
- If the secret was successfully resolved by vault, returns an Optionalcontaining the value returned by the vault as aString(a valid value can benull), or an emptyOptional
 
 - 
closepublic void close() Description copied from interface:VaultStringSecretDestroys the secret in memory by e.g. overwriting it with random garbage or release references in case of immutable secrets.- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- VaultStringSecret
 
 
- 
 
-