Package org.keycloak.vault
Interface VaultCharSecret
- 
- All Superinterfaces:
- AutoCloseable
 - All Known Implementing Classes:
- DefaultVaultCharSecret
 
 public interface VaultCharSecret extends AutoCloseable ACharBufferbased representation of the secret obtained from the vault that supports automated cleanup of memory.- Author:
- Stefan Guilhen
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Destroys the secret in memory by e.g.Optional<CharBuffer>get()Returns the secret enclosed in aCharBuffer.Optional<char[]>getAsArray()Returns the secret in itschar[]form.
 
- 
- 
- 
Method Detail- 
getOptional<CharBuffer> get() Returns the secret enclosed in aCharBuffer.- Returns:
- If the secret was successfully resolved by vault, returns an Optionalcontaining the value returned by the vault as aCharBuffer(a valid value can benull), or an emptyOptional
 
 - 
getAsArrayOptional<char[]> getAsArray() Returns the secret in itschar[]form.
 - 
closevoid close() Destroys the secret in memory by e.g. overwriting it with random garbage.- Specified by:
- closein interface- AutoCloseable
 
 
- 
 
-