def decode(self, response, request):
        try:
            creds = binascii.a2b_base64(response + b'===')
        except binascii.Error:
            raise error.LoginFailed('Invalid credentials')

        creds = creds.split(b':', 1)
        if len(creds) == 2:
            return credentials.UsernamePassword(*creds)
        else:
            raise error.LoginFailed('Invalid credentials')
Parse the base64-encoded, colon-separated username and password into a
dataset/ETHPy150Open twisted/twisted/twisted/web/_auth/basic.py/BasicCredentialFactory.decode