Return a boolean of whether the raw_password was correct. Handles hashing formats behind the scenes.
(self, raw_password)
| 95 | self._password = raw_password |
| 96 | |
| 97 | def check_password(self, raw_password): |
| 98 | """ |
| 99 | Return a boolean of whether the raw_password was correct. Handles |
| 100 | hashing formats behind the scenes. |
| 101 | """ |
| 102 | |
| 103 | def setter(raw_password): |
| 104 | self.set_password(raw_password) |
| 105 | # Password hash upgrades shouldn't be considered password changes. |
| 106 | self._password = None |
| 107 | self.save(update_fields=["password"]) |
| 108 | |
| 109 | return check_password(raw_password, self.password, setter) |
| 110 | |
| 111 | async def acheck_password(self, raw_password): |
| 112 | """See check_password().""" |
nothing calls this directly
no test coverage detected