def requestAvatarId(self, c):
        '''
        Please, please for the love of all that is holy to you, 
        make sure that your scheme is 'https'
        '''
        url = '%s://%s:%s@%s:%s%s' % (self.scheme, c.username, c.password, 
            self.host, self.port, self.path)
        server = xmlrpclib.ServerProxy(url)
        info = server.getXMLRPCUserInfo()
        if info.get('authenticated'):
            return defer.succeed(c.username)
        else:
            return defer.fail(error.UnauthorizedLogin())

        Please, please for the love of all that is holy to you, 
        make sure that your scheme is 'https'
        
recipes/Python/473838_Authenticating_Twisted/recipe-473838.py