CardName = 'CDatazone Managed Demo Card'; $test->setCardImage('cardimg.png', 'image/png'); /* Do not require the relying party to identity themselves */ // $test->requireRelyingParty(TRUE); $test->setExpireTime("+1 Year"); $objClaim = new ICardClaimType("http://cdatazone/preference", 'preference', 'Category Preference'); $test->addClaimType($objClaim); $test->setTokenTypes(array('http://cdatazone.org/preferences')); /* I dont have a pprivacy notice yet */ // $test->setPrivacyNotice('http://www.cdatazone.org', 1); $objEndPoint = new ICardEndpoint(CT_SITE_URL.'ip.php', CT_SITE_URL.'mex.php'); $objEndPoint->setIdentityX509(, True, True); $objUserCred = new ICardUserCredential(ICardUserCredential::UsernamePasswordCredential, 'Enter Username and Password'); $objUserCred->setUserName($username); $objSVC = new ICardTokenService($objEndPoint, $objUserCred); $test->addService($objSVC); $icard = $test->getCard(); $objKey = new XMLSecurityKey(XMLSecurityKey::RSA_SHA1, array('type'=>'private')); $objKey->loadKey(, TRUE); $objDSig = new XMLSecurityDSig(); $objDSig->setCanonicalMethod(XMLSecurityDSig::EXC_C14N); $node = $objDSig->addObject($test->cardDoc->documentElement); $objDSig->addReferenceList(array($node), XMLSecurityDSig::SHA1, NULL, NULL); $objDSig->sign($objKey); $objDSig->add509Cert(, True, True); print $objDSig->sigNode->ownerDocument->saveXML($objDSig->sigNode->ownerDocument->documentElement); ?>