'Choose an C{ICredentialFactory} from C{_credentialFactories}
suitable to use to decode the given I{Authenticate} header.
@return: A two-tuple of a factory and the remaining portion of the
header value to be decoded or a two-tuple of L{None} if no
factory can decode the header value.'

def _selectParseHeader(self, header):

    elements = header.split('    ')
    scheme = elements[0].lower()
    for fact in self._credentialFactories:
        if (fact.scheme == scheme):
            return (fact, '    '.join(elements[1:]))
    return (None, None)
