See check_password().
(self, raw_password)
| 109 | return check_password(raw_password, self.password, setter) |
| 110 | |
| 111 | async def acheck_password(self, raw_password): |
| 112 | """See check_password().""" |
| 113 | |
| 114 | async def setter(raw_password): |
| 115 | self.set_password(raw_password) |
| 116 | # Password hash upgrades shouldn't be considered password changes. |
| 117 | self._password = None |
| 118 | await self.asave(update_fields=["password"]) |
| 119 | |
| 120 | return await acheck_password(raw_password, self.password, setter) |
| 121 | |
| 122 | def set_unusable_password(self): |
| 123 | # Set a value that will never be a valid hash |