Use RenewTokenAsSelf instead

This commit is contained in:
Seth Vargo 2017-06-20 15:52:40 -07:00
parent dcbd729afa
commit 42354aed99
No known key found for this signature in database
GPG key ID: C921994F9C27E0FF
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
}