Update WebAPITokenManager to use token generators
Review Request #12419 — Created June 28, 2022 and submitted — Latest diff uploaded
Currently, token generation is baked into
djblets.webapi.managers.WebAPITokenManager. With our move to API Tokens v2,
we don't want token generation to be tightly coupled with Web API tokens. We
want tokens to be usable outside of just the API.
This change moves token generation out of
WebAPITokenManagerby making use of
token generators instead of directly generating tokens in
To do this we add two new parameters to
token_generator_idto decide what token generator to use and
pass along information needed for token generation to the token generator.
WebAPITokenManager's unit tests to account for the use
of token generators.
- Ran all unit tests in