diff options
Diffstat (limited to 'keystoneclient/v3')
| -rw-r--r-- | keystoneclient/v3/tokens.py | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/keystoneclient/v3/tokens.py b/keystoneclient/v3/tokens.py index 1b03002..924d67e 100644 --- a/keystoneclient/v3/tokens.py +++ b/keystoneclient/v3/tokens.py @@ -41,15 +41,23 @@ class TokenManager(object): headers = {'X-Subject-Token': token_id} return self._client.delete('/auth/tokens', headers=headers) - def get_revoked(self): + @positional.method(0) + def get_revoked(self, audit_id_only=False): """Get revoked tokens list. - :returns: A dict containing "signed" which is a CMS formatted string. + :param bool audit_id_only: If true, the server is requested to not send + token IDs. **New in version 2.2.0.** + :returns: A dict containing ``signed`` which is a CMS formatted string + if the server signed the response. If `audit_id_only` then the + response may be a dict containing ``revoked`` which is the list of + token audit IDs and expiration times. :rtype: dict """ - - resp, body = self._client.get('/auth/tokens/OS-PKI/revoked') + path = '/auth/tokens/OS-PKI/revoked' + if audit_id_only: + path += '?audit_id_only' + resp, body = self._client.get(path) return body @positional.method(1) |
