Reinstate the token parameter to api.RevokeSelf to avoid breaking compatibility

This commit is contained in:
Jeff Mitchell
2016-09-13 11:03:05 -04:00
parent d37d187a68
commit 47aafa6ee1

View File

@@ -172,8 +172,10 @@ func (c *TokenAuth) RevokeOrphan(token string) error {
return nil
}
// RevokeSelf revokes the token making the call
func (c *TokenAuth) RevokeSelf() error {
// RevokeSelf revokes the token making the call. The `token` parameter is kept
// for backwards compatibility but is ignored; only the client's set token has
// an effect.
func (c *TokenAuth) RevokeSelf(token string) error {
r := c.c.NewRequest("PUT", "/v1/auth/token/revoke-self")
resp, err := c.c.RawRequest(r)
if err != nil {