Use RenewTokenAsSelf instead

This commit is contained in:
Seth Vargo
2017-06-20 15:52:40 -07:00
parent dcbd729afa
commit 42354aed99
2 changed files with 3 additions and 3 deletions

View File

@@ -135,9 +135,9 @@ func (c *TokenAuth) RenewSelf(increment int) (*Secret, error) {
return ParseSecret(resp.Body)
}
// RenewSelfAsToken behaves like renew-self, but authenticates using a provided
// RenewTokenAsSelf behaves like renew-self, but authenticates using a provided
// token instead of the token attached to the client.
func (c *TokenAuth) RenewSelfAsToken(token string, increment int) (*Secret, error) {
func (c *TokenAuth) RenewTokenAsSelf(token string, increment int) (*Secret, error) {
r := c.c.NewRequest("PUT", "/v1/auth/token/renew-self")
r.ClientToken = token

View File

@@ -148,7 +148,7 @@ func (r *Renewer) renewAuth() error {
}
// Renew the auth.
renewal, err := client.Auth().Token().RenewSelfAsToken(token, 0)
renewal, err := client.Auth().Token().RenewTokenAsSelf(token, 0)
if err != nil {
return err
}