public class VaultWrappingTemplate extends Object implements VaultWrappingOperations
Constructor and Description |
---|
VaultWrappingTemplate(VaultOperations vaultOperations)
Create a new
VaultWrappingTemplate given VaultOperations . |
Modifier and Type | Method and Description |
---|---|
WrappedMetadata |
lookup(VaultToken token)
Looks up
metadata for the given token containing a wrapped
response. |
VaultResponse |
read(VaultToken token)
Read a wrapped secret.
|
<T> VaultResponseSupport<T> |
read(VaultToken token,
Class<T> responseType)
Read a wrapped secret of type
responseType . |
WrappedMetadata |
rewrap(VaultToken token)
Rewraps a response-wrapped token.
|
WrappedMetadata |
wrap(Object body,
Duration duration)
Wraps the given user-supplied data inside a response-wrapped token.
|
public VaultWrappingTemplate(VaultOperations vaultOperations)
VaultWrappingTemplate
given VaultOperations
.vaultOperations
- must not be null.@Nullable public WrappedMetadata lookup(VaultToken token)
VaultWrappingOperations
metadata
for the given token containing a wrapped
response.lookup
in interface VaultWrappingOperations
token
- must not be null.WrappedMetadata
the token
or null if the
token was invalid or expired.@Nullable public VaultResponse read(VaultToken token)
VaultWrappingOperations
read
in interface VaultWrappingOperations
token
- must not be null.@Nullable public <T> VaultResponseSupport<T> read(VaultToken token, Class<T> responseType)
VaultWrappingOperations
responseType
.read
in interface VaultWrappingOperations
token
- must not be null.responseType
- must not be null.public WrappedMetadata rewrap(VaultToken token)
VaultWrappingOperations
VaultException
.rewrap
in interface VaultWrappingOperations
token
- must not be null.WrappedMetadata
for this wrapping operation.public WrappedMetadata wrap(Object body, Duration duration)
VaultWrappingOperations
wrap
in interface VaultWrappingOperations
body
- must not be null.duration
- must not be null.WrappedMetadata
for this wrapping operation.Copyright © 2016–2021 Pivotal Software, Inc.. All rights reserved.