def check_username_and_password(self, username, password):
        """Assert the login credentials.

        :param username: A user name sent from the login form.
        :type username: str
        :param password: A pass word sent from the login form.
        :type password: str

        :returns: A non-empty error string if the authentication fails.
        :rtype: str
        """
Assert the login credentials.

        :param username: A user name sent from the login form.
        :type username: str
        :param password: A pass word sent from the login form.
        :type password: str

        :returns: A non-empty error string if the authentication fails.
        :rtype: str
        
cherrypy/lib/cptools.py