Fix setting the default token generator via Djblets.

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

Information

Djblets
release-3.x

Reviewers

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.

Changes between revision 1 and 2

orig
1
2
3

Commits

Summary ID Author
Fix setting the default token generator via Djblets.
ccbae85d590328de4b6a2474f0278958b4f8c2cb Michelle Aubin
Fix setting the default token generator via Djblets.
9eb542ec881b0a2fb38390d10d107e6355247735 Michelle Aubin
djblets/secrets/token_generators/registry.py
Loading...