JWT wrapping tokens (#2172)

This commit is contained in:
Jeff Mitchell
2017-01-04 16:44:03 -05:00
committed by GitHub
parent c39ebc4ccd
commit 0dd5a2a6ba
51 changed files with 3247 additions and 240 deletions

View File

@@ -44,7 +44,9 @@ func TestCopy_request(t *testing.T) {
Data: map[string]interface{}{
"foo": "bar",
},
WrapTTL: 60 * time.Second,
WrapInfo: &logical.RequestWrapInfo{
TTL: 60 * time.Second,
},
}
arg := expected
@@ -67,7 +69,7 @@ func TestCopy_response(t *testing.T) {
Data: map[string]interface{}{
"foo": "bar",
},
WrapInfo: &logical.WrapInfo{
WrapInfo: &logical.ResponseWrapInfo{
TTL: 60,
Token: "foo",
CreationTime: time.Now(),
@@ -138,7 +140,7 @@ func TestHash(t *testing.T) {
Data: map[string]interface{}{
"foo": "bar",
},
WrapInfo: &logical.WrapInfo{
WrapInfo: &logical.ResponseWrapInfo{
TTL: 60,
Token: "bar",
CreationTime: now,
@@ -149,7 +151,7 @@ func TestHash(t *testing.T) {
Data: map[string]interface{}{
"foo": "hmac-sha256:f9320baf0249169e73850cd6156ded0106e2bb6ad8cab01b7bbbebe6d1065317",
},
WrapInfo: &logical.WrapInfo{
WrapInfo: &logical.ResponseWrapInfo{
TTL: 60,
Token: "hmac-sha256:f9320baf0249169e73850cd6156ded0106e2bb6ad8cab01b7bbbebe6d1065317",
CreationTime: now,