':param response: The SAML response, transport encoded
:param binding: Which binding the query came in over'

def do(self, response, binding, relay_state='', mtype='response'):

    if (not response):
        logger.info('Missing    Response')
        resp = Unauthorized('Unknown    user')
        return resp(self.environ, self.start_response)
    try:
        self.response = self.sp.parse_authn_request_response(response, binding, self.outstanding_queries)
    except UnknownPrincipal as excp:
        logger.error(('UnknownPrincipal:    %s' % (excp,)))
        resp = ServiceError(('UnknownPrincipal:    %s' % (excp,)))
        return resp(self.environ, self.start_response)
    except UnsupportedBinding as excp:
        logger.error(('UnsupportedBinding:    %s' % (excp,)))
        resp = ServiceError(('UnsupportedBinding:    %s' % (excp,)))
        return resp(self.environ, self.start_response)
    except VerificationError as err:
        resp = ServiceError(('Verification    error:    %s' % (err,)))
        return resp(self.environ, self.start_response)
    except Exception as err:
        resp = ServiceError(('Other    error:    %s' % (err,)))
        return resp(self.environ, self.start_response)
    logger.info(('AVA:    %s' % self.response.ava))
    user = User(self.response.name_id, self.response.ava)
    cookie = self.cache.set_cookie(user)
    resp = Redirect('/', headers=[('Location', '/'), cookie])
    return resp(self.environ, self.start_response)
