    def check_blocked_users(self, username, authentication=None):
        """Check if a username is blocked to authenticate based on Authenticator.blocked_users configuration

        Return True if username is allowed, False otherwise.
        No block list means any username is allowed.

        Names are normalized *before* being checked against the block list.

        .. versionadded: 0.9

        .. versionchanged:: 1.0
            Signature updated to accept authentication data as second argument

        .. versionchanged:: 1.2
            Renamed check_blacklist to check_blocked_users

        Args:
            username (str):
                The normalized username
            authentication (dict):
                The authentication model, as returned by `.authenticate()`.
        Returns:
            allowed (bool):
                Whether the user is allowed
        Raises:
            web.HTTPError(403, message):
                Raising HTTPErrors directly allows customizing the message shown to the user.
        """
        if not self.blocked_users:
            # No block list means any name is allowed
            return True
        return username not in self.blocked_users
Check if a username is blocked to authenticate based on Authenticator.blocked_users configuration

Return True if username is allowed, False otherwise.
No block list means any username is allowed.

Names are normalized *before* being checked against the block list.

.. versionadded: 0.9

.. versionchanged:: 1.0
Signature updated to accept authentication data as second argument

.. versionchanged:: 1.2
Renamed check_blacklist to check_blocked_users

Args:
username (str):
The normalized username
authentication (dict):
The authentication model, as returned by `.authenticate()`.
Returns:
allowed (bool):
Whether the user is allowed
Raises:
web.HTTPError(403, message):
Raising HTTPErrors directly allows customizing the message shown to the user.
jupyterhub/auth.py