简体   繁体   English

密码重置期间DJANGO中生成的令牌存储在哪里

[英]Where is the generated token in DJANGO stored during password reset

I am trying to access the generated token(in the database table) when I request the "forgotten password" functionality, but I cannot seem to find it. 当我请求“忘记密码”功能时,我试图访问生成的令牌(在数据库表中),但似乎找不到它。

I am using django 1.10 , rest_framework , django-rest-auth . 我正在使用django 1.10rest_frameworkdjango-rest-auth I have checked inside authtoken_token as well as inside account_emailconfirmation tables but was unsuccessfully. 我已经检查了authtoken_token内部以及account_emailconfirmation表内部,但未成功。

In github the source code refers to this in python as token_model I think https://github.com/Tivix/django-rest-auth/blob/master/rest_auth/utils.py 在github中,源代码在python中token_model称为token_model我认为https://github.com/Tivix/django-rest-auth/blob/master/rest_auth/utils.py

It doesn't store anywhere except user email. 除了用户电子邮件,它不存储任何地方。 When user click on the provided link token parsed by PasswordResetTokenGenerator to obtain timestamp. 当用户单击由PasswordResetTokenGenerator解析的提供的链接令牌以获得时间戳时。 With this timestamp PasswordResetTokenGenerator generate NEW token. 使用此时间戳, PasswordResetTokenGenerator生成NEW令牌。 And compare this new token with provided by user, see check_token method. 并将此新令牌与用户提供的令牌进行比较,请参见check_token方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM