Remove RevokePrefix from the API too as we simply do not support it any

longer.
This commit is contained in:
Jeff Mitchell
2016-04-05 11:00:12 -04:00
parent 9803b9fceb
commit 254023f55c
3 changed files with 6 additions and 18 deletions

View File

@@ -1,11 +1,11 @@
package api
// TokenAuth is used to perform token backend operations on Vault.
// TokenAuth is used to perform token backend operations on Vault
type TokenAuth struct {
c *Client
}
// Token is used to return the client for logical-backend API calls.
// Token is used to return the client for token-backend API calls
func (a *Auth) Token() *TokenAuth {
return &TokenAuth{c: a.c}
}
@@ -136,19 +136,6 @@ func (c *TokenAuth) RevokeOrphan(token string) error {
return nil
}
// RevokePrefix revokes a token based on a prefix, which can be used to revoke
// e.g. all tokens issued by a certain credential mount
func (c *TokenAuth) RevokePrefix(token string) error {
r := c.c.NewRequest("PUT", "/v1/auth/token/revoke-prefix/"+token)
resp, err := c.c.RawRequest(r)
if err != nil {
return err
}
defer resp.Body.Close()
return nil
}
// RevokeSelf revokes the token making the call
func (c *TokenAuth) RevokeSelf(token string) error {
r := c.c.NewRequest("PUT", "/v1/auth/token/revoke-self")