2017-04-24 19:15:01 +00:00
|
|
|
package wrapping
|
|
|
|
|
|
|
|
import "time"
|
|
|
|
|
|
|
|
type ResponseWrapInfo struct {
|
|
|
|
// Setting to non-zero specifies that the response should be wrapped.
|
|
|
|
// Specifies the desired TTL of the wrapping token.
|
2017-11-09 17:47:42 +00:00
|
|
|
TTL time.Duration `json:"ttl" structs:"ttl" mapstructure:"ttl" sentinel:""`
|
2017-04-24 19:15:01 +00:00
|
|
|
|
|
|
|
// The token containing the wrapped response
|
2017-11-09 17:47:42 +00:00
|
|
|
Token string `json:"token" structs:"token" mapstructure:"token" sentinel:""`
|
2017-04-24 19:15:01 +00:00
|
|
|
|
2017-11-13 20:31:32 +00:00
|
|
|
// The token accessor for the wrapped response token
|
|
|
|
Accessor string `json:"accessor" structs:"accessor" mapstructure:"accessor"`
|
|
|
|
|
2017-04-24 19:15:01 +00:00
|
|
|
// The creation time. This can be used with the TTL to figure out an
|
|
|
|
// expected expiration.
|
2017-11-09 17:47:42 +00:00
|
|
|
CreationTime time.Time `json:"creation_time" structs:"creation_time" mapstructure:"creation_time" sentinel:""`
|
2017-04-24 19:15:01 +00:00
|
|
|
|
|
|
|
// If the contained response is the output of a token creation call, the
|
|
|
|
// created token's accessor will be accessible here
|
2017-11-09 17:47:42 +00:00
|
|
|
WrappedAccessor string `json:"wrapped_accessor" structs:"wrapped_accessor" mapstructure:"wrapped_accessor" sentinel:""`
|
2017-04-24 19:15:01 +00:00
|
|
|
|
2017-10-11 17:21:20 +00:00
|
|
|
// WrappedEntityID is the entity identifier of the caller who initiated the
|
|
|
|
// wrapping request
|
2018-02-05 19:26:31 +00:00
|
|
|
WrappedEntityID string `json:"wrapped_entity_id" structs:"wrapped_entity_id" mapstructure:"wrapped_entity_id" sentinel:""`
|
2017-10-11 17:21:20 +00:00
|
|
|
|
2017-04-24 19:15:01 +00:00
|
|
|
// The format to use. This doesn't get returned, it's only internal.
|
2017-11-09 17:47:42 +00:00
|
|
|
Format string `json:"format" structs:"format" mapstructure:"format" sentinel:""`
|
2017-08-02 22:28:58 +00:00
|
|
|
|
|
|
|
// CreationPath is the original request path that was used to create
|
|
|
|
// the wrapped response.
|
2017-11-09 17:47:42 +00:00
|
|
|
CreationPath string `json:"creation_path" structs:"creation_path" mapstructure:"creation_path" sentinel:""`
|
|
|
|
|
|
|
|
// Controls seal wrapping behavior downstream for specific use cases
|
|
|
|
SealWrap bool `json:"seal_wrap" structs:"seal_wrap" mapstructure:"seal_wrap" sentinel:""`
|
2017-04-24 19:15:01 +00:00
|
|
|
}
|