MCPcopy
hub / github.com/django/django / make_token

Method make_token

django/contrib/auth/tokens.py:40–49  ·  view source on GitHub ↗

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

(self, user)

Source from the content-addressed store, hash-verified

38 secret_fallbacks = property(_get_fallbacks, _set_fallbacks)
39
40 def make_token(self, user):
41 """
42 Return a token that can be used once to do a password reset
43 for the given user.
44 """
45 return self._make_token_with_timestamp(
46 user,
47 self._num_seconds(self._now()),
48 self.secret,
49 )
50
51 def check_token(self, user, token):
52 """

Calls 3

_num_secondsMethod · 0.95
_nowMethod · 0.95