Fix setting the default token generator via Djblets.
Review Request #12582 — Created Sept. 6, 2022 and submitted
The default token generator can be set via
settings.DJBLETS_DEFAULT_API_TOKEN_GENERATOR
but this currently takes a class,
which isn't safe to import viasettings.py
. With this change we instead accept
a token generator ID, which is safe and ensures that we're only using token
generators that are registered.
- Created new unit tests for getting the default token generator.
- Ran unit tests in
djblets.secrets.tests
. - Ran unit tests in
reviewboard.webapi.tests
.
Summary | ID |
---|---|
9373ea79339567b65decee1fa39d63a4ef8a7c33 |
Description | From | Last Updated |
---|---|---|
Instead of instantiating a second copy of this, how about just returning self.get_token_generator('vendor_checksum')? We could also just assign that to … |
david | |
Let's change this slightly, to deal with any issue of the generator ID being falsy (if, say, we wanted to … |
chipx86 |
- Commits:
-
Summary ID ccbae85d590328de4b6a2474f0278958b4f8c2cb 9eb542ec881b0a2fb38390d10d107e6355247735
Checks run (2 succeeded)
flake8
passed.
JSHint
passed.