djblets.secrets.token_generators.vendor_checksum¶
Generator for tokens that contain an identifiable prefix and checksum.
New in version 3.0.
- class VendorChecksumTokenGenerator¶
Bases:
BaseTokenGenerator
Generator for tokens that contain an identifiable prefix and checksum.
Tokens of this format contain a prefix for identification (such as the vendor or type) and a checksum.
New in version 3.0.
- token_generator_id: Optional[str] = 'vendor_checksum'¶
The unique ID of the token generator, for registration purposes.
- Type:
- CHARSET = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'¶
The character set to use for encoding the token.
- Type:
- create_token(token_info: Dict[str, Any] = {}, **kwargs) str ¶
Create a token that contains a prefix and checksum.
- Parameters:
- Returns:
The token value.
- Return type:
- Raises:
KeyError – The
token_info
dictionary is missing a required key.