Token generation algorithm

This module defines a generator for tokens to map two different users. We mimic the behaviour of the token generator of django.contrib.auth.tokens

Classes:

UserLinkingTokenGenerator()

Strategy object used to generate and check tokens for the password reset mechanism.

class django_helmholtz_aai.tokens.UserLinkingTokenGenerator

Bases: object

Strategy object used to generate and check tokens for the password reset mechanism.

Attributes:

algorithm

key_salt

secret

secret_fallbacks

Methods:

check_token(user, new_user, token)

Check that a password reset token is correct for a given user.

make_token(user, new_user)

Return a token that can be used once to do a password reset for the given user.

algorithm: str = 'sha256'
check_token(user: User, new_user: User, token)

Check that a password reset token is correct for a given user.

key_salt = 'django_helmholtz_aai.tokens.UserLinkingTokenGenerator'
make_token(user: User, new_user: User)

Return a token that can be used once to do a password reset for the given user.

property secret: str
property secret_fallbacks: List[str | bytes]