'Respond to this request.
Given a L{Signatory}, I can check the validity of the signature and
the X{C{invalidate_handle}}.
@param signatory: The L{Signatory} to use to check the signature.
@type signatory: L{Signatory}
@returns: A response with an X{C{is_valid}} (and, if
appropriate X{C{invalidate_handle}}) field.
@returntype: L{OpenIDResponse}'

def answer(self, signatory):

    is_valid = signatory.verify(self.assoc_handle, self.signed)
    signatory.invalidate(self.assoc_handle, dumb=True)
    response = OpenIDResponse(self)
    valid_str = ((is_valid and 'true') or 'false')
    response.fields.setArg(OPENID_NS, 'is_valid', valid_str)
    if self.invalidate_handle:
        assoc = signatory.getAssociation(self.invalidate_handle, dumb=False)
        if (not assoc):
            response.fields.setArg(OPENID_NS, 'invalidate_handle', self.invalidate_handle)
    return response
