def check_password(self, password):
"""Validate the plain text `password`.
Since all users from third-party authentication providers will store
:data:`None` in this attribute, you may call
:func:`railgun.website.userauth.authenticate` if you just want
to validate a user login at a very high-level stage. This method,
however, is called mainly by the utilities in
:mod:`~railgun.website.userauth`.
:param password: The plain text password.
:type password: :class:`str`
:return: True if `password` passes validation, False otherwise.
"""
return check_password_hash(self.password, password)
评论列表
文章目录