'Parse the base64-encoded, colon-separated username and password into a
L{credentials.UsernamePassword} instance.'

def decode(self, response, request):

    try:
        creds = binascii.a2b_base64((response + '==='))
    except binascii.Error:
        raise error.LoginFailed('Invalid    credentials')
    creds = creds.split(':', 1)
    if (len(creds) == 2):
        return credentials.UsernamePassword(*creds)
    else:
        raise error.LoginFailed('Invalid    credentials')
