Skip to content

Commit

Permalink
Reinstate the token parameter to api.RevokeSelf to avoid breaking com…
Browse files Browse the repository at this point in the history
…patibility
  • Loading branch information
jefferai committed Sep 13, 2016
1 parent d37d187 commit 47aafa6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions api/auth_token.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 47aafa6

Please sign in to comment.