Update api tokens implementation
Currently tokens are modeled as AccessToken entity and access-tokens db table.
The following changes are required:
-
access_tokenstable should be dropped and replaced withuser_api_tokenstable (entity class should be renamed accordingly) - the
user_idcolumn should have an actual relation to theuserstable - a
deletedboolean flag should be added - it shouldn't be possible to add a second token with an existing name to given user
- token deletion action should be supported over the REST API (only invalidated token can be deleted -
deletedflag should be set totrue) - deleted tokens should not be returned over REST API