openstack/keystone — pull request #10 by icgood (2012-08-27 19:05:22+00:00)
Title: Support user-indexed token deletion

The current method for invaliding tokens for users that have been disabled or have changed their password is very limiting for backend drivers that support indexed deletes, SQL for example.

I am proposing a minor change that would allow implementation of a new method in token drivers, `delete_tokens_for_user()`, which drivers may use to implement an operation that deletes all a user's tokens using whatever method it has available. In SQL for example, that may be using a custom index on the user ID to delete all of the tokens at once.

This change is completely backwards compatible with existing token drivers. All tests continue to pass, unmodified.