Fix setting the default token generator via Djblets.

Review Request #12582 — Created Sept. 6, 2022 and submitted — Latest diff uploaded

maubin
Djblets
release-3.x
djblets

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 via settings.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.

Commits

Files

Loading...