builtin: fixing API change in logical framework

This commit is contained in:
Armon Dadgar 2015-06-17 14:34:11 -07:00
parent ae421f75b7
commit 45d3c512fb
7 changed files with 8 additions and 8 deletions

View File

@ -61,7 +61,7 @@ func (b *backend) pathLogin(
Policies: matched.Entry.Policies,
DisplayName: matched.Entry.DisplayName,
Metadata: map[string]string{
"cert_name": matched.Entry.Name,
"cert_name": matched.Entry.Name,
"common_name": connState.PeerCertificates[0].Subject.CommonName,
},
LeaseOptions: logical.LeaseOptions{
@ -187,5 +187,5 @@ func (b *backend) pathLoginRenew(
return nil, nil
}
return framework.LeaseExtend(cert.Lease, 0)(req, d)
return framework.LeaseExtend(cert.Lease, 0, false)(req, d)
}

View File

@ -77,7 +77,7 @@ func (b *backend) pathLoginRenew(
return logical.ErrorResponse("policies have changed, revoking login"), nil
}
return framework.LeaseExtend(1*time.Hour, 0)(req, d)
return framework.LeaseExtend(1*time.Hour, 0, false)(req, d)
}
const pathLoginSyn = `

View File

@ -68,7 +68,7 @@ func (b *backend) pathLoginRenew(
return nil, nil
}
return framework.LeaseExtend(1*time.Hour, 0)(req, d)
return framework.LeaseExtend(1*time.Hour, 0, false)(req, d)
}
const pathLoginSyn = `

View File

@ -115,7 +115,7 @@ func (b *backend) secretAccessKeysRenew(
lease = &configLease{Lease: 1 * time.Hour}
}
f := framework.LeaseExtend(lease.Lease, lease.LeaseMax)
f := framework.LeaseExtend(lease.Lease, lease.LeaseMax, false)
return f(req, d)
}

View File

@ -26,7 +26,7 @@ func secretToken() *framework.Secret {
DefaultDuration: DefaultLeaseDuration,
DefaultGracePeriod: DefaultGracePeriod,
Renew: framework.LeaseExtend(1*time.Hour, 0),
Renew: framework.LeaseExtend(0, 0, true),
Revoke: secretTokenRevoke,
}
}

View File

@ -44,7 +44,7 @@ func (b *backend) secretCredsRenew(
lease = &configLease{Lease: 1 * time.Hour}
}
f := framework.LeaseExtend(lease.Lease, lease.LeaseMax)
f := framework.LeaseExtend(lease.Lease, lease.LeaseMax, false)
return f(req, d)
}

View File

@ -58,7 +58,7 @@ func (b *backend) secretCredsRenew(
lease = &configLease{Lease: 1 * time.Hour}
}
f := framework.LeaseExtend(lease.Lease, lease.LeaseMax)
f := framework.LeaseExtend(lease.Lease, lease.LeaseMax, false)
resp, err := f(req, d)
if err != nil {
return nil, err