~ | | Currently, Djblets can only generate SHA1 tokens. As part of our move to using
|
~ | | an improved token format, we need a way to generate different types of tokens. |
| ~ | Currently, Djblets can only generate SHA1 tokens and token generation is
|
| ~ | baked into djblets.webapi.managers.WebAPITokenManager . As part of our move to
|
| + | using an improved token format (API Tokens v2), we need a way to generate
|
| + | different types of tokens. |
| |
|
~ | | This change introduces Token Generator classes, with three classes implemented:
|
~ | | 1. A Base class
|
~ | | 2. A class for our legacy SHA1 tokens
|
~ | | 3. A class for our new token format that has a vendor prefix and checksum. |
| ~ | This change introduces token generators, which handle the logic for token
|
| ~ | generation and allows for multiple ways of generating tokens. There are three
|
| ~ | classes implemented:
|
| ~ | 1. A base class.
|
| + | 2. A class for generating our legacy SHA1 tokens.
|
| + | 3. A class for generating our new token format that has a vendor prefix and
|
| + | checksum. |
| + |
|
| + | This also adds a registry for the token generators. |