@classmethod
def register(cls, scheme, challenge_class):
    """Registers a class to represent a challenge in scheme

        scheme
            A string representing an auth scheme, e.g., 'Basic'.  The
            string is converted to lower-case before it is registered
            to allow for case insensitive look-up.

        challenge_class
            A class derived from Challenge that is used to represent a
            Challenge issued using that scheme

        If a class has already been registered for the scheme it is
        replaced.  The mapping is kept in the :attr:`scheme_class`
        dictionary."""
    cls.scheme_class[scheme.lower()] = challenge_class
