'Construct me.
These parameters are assigned directly as class attributes, see
my L{class documentation<CheckIDRequest>} for their descriptions.
@raises MalformedReturnURL: When the C{return_to} URL is not a URL.'

def __init__(self, identity, return_to, trust_root=None, immediate=False, assoc_handle=None, op_endpoint=None, claimed_id=None):

    self.assoc_handle = assoc_handle
    self.identity = identity
    self.claimed_id = (claimed_id or identity)
    self.return_to = return_to
    self.trust_root = (trust_root or return_to)
    self.op_endpoint = op_endpoint
    assert (self.op_endpoint is not None)
    if immediate:
        self.immediate = True
        self.mode = 'checkid_immediate'
    else:
        self.immediate = False
        self.mode = 'checkid_setup'
    if ((self.return_to is not None) and (not TrustRoot.parse(self.return_to))):
        raise MalformedReturnURL(None, self.return_to)
    if (not self.trustRootValid()):
        raise UntrustedReturnURL(None, self.return_to, self.trust_root)
    self.message = None
