MCPcopy
hub / github.com/django/django / check_password

Method check_password

django/contrib/auth/base_user.py:97–109  ·  view source on GitHub ↗

Return a boolean of whether the raw_password was correct. Handles hashing formats behind the scenes.

(self, raw_password)

Source from the content-addressed store, hash-verified

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()."""

Callers

nothing calls this directly

Calls 1

check_passwordFunction · 0.90

Tested by

no test coverage detected