{"id":430,"date":"2006-04-15T08:41:12","date_gmt":"2006-04-15T16:41:12","guid":{"rendered":"\/?p=430"},"modified":"2012-11-01T11:51:11","modified_gmt":"2012-11-01T11:51:11","slug":"simple-infocard-tutorial-and-demo","status":"publish","type":"post","link":"https:\/\/www.identityblog.com\/?p=430","title":{"rendered":"SELF-ISSUED INFOCARD TUTORIAL AND DEMO"},"content":{"rendered":"<p style=\"float: right;\"><a style=\"color: #9b0000;\" href=\"https:\/\/www.identityblog.com\/codesample.php?simple-infocard-demo\/encrypted_token\" class=\"broken_link\">THE ENCRYPTED TOKEN<\/a> \u00bb<\/p>\n<p id=\"post-429\" class=\"title\"><a href=\"\/?p=430\">A SELF-ISSUED INFOCARD TUTORIAL AND DEMO<\/a><\/p>\n<p class=\"excerpt\">This tutorial includes a demo, an explanation of how Self-Issued InfoCard identity tokens work, and sample PHP code allowing you to accept\u00a0these tokens at a web site.<\/p>\n<p><a href=\"\/wp-content\/resources\/simple-infocard-demo\/simple-infocard-demo.avi\" class=\"broken_link\"><img style=\"padding-right: 0px; padding-left: 10px; padding-bottom: 10px; padding-top: 0px;\" src=\"https:\/\/www.identityblog.com\/wp-contents\/resources\/simple-infocard-demo\/simple-cover.jpg\" alt=\"\" align=\"right\" border=\"0\" \/><\/a>One of the key goals of InfoCard and the Identity Metasystem is to\u00a0put the release of identity information under the direct control of computer users.\u00a0\u00a0At the same time,\u00a0the system respects the right of a web site\u00a0to say what information it requires to\u00a0grant entry.\u00a0\u00a0The accompanying demo\u00a0shows how\u00a0InfoCards help bring the two sides of this equation together in a way that accords with the <a href=\"\/?p=354\">Laws of Identity<\/a>.<\/p>\n<p>Information Card technology can be used to manage the exchange of any kind of token.\u00a0 CardSpace&amp;#39s self-issued tokens use the SAML format.\u00a0\u00a0With this format, identity information\u00a0sent to a site\u00a0is &#8220;signed&#8221; to guarantee that\u00a0it really comes from\u00a0whoever originates the &#8220;claims&#8221; in the identity token.\u00a0 Then, to protect the user&amp;#39s information during release, it is encrypted so only that site\u00a0can get at it.<\/p>\n<p>How\u00a0can the identity provider\u00a0encrypt the information\u00a0destined for\u00a0your web site?\u00a0 You need a public key and certificate.\u00a0 In the current version of InfoCard this has to be an SSL certificate (mine cost me\u00a0under $20), and your web server\u00a0needs to be able to support https.\u00a0 Identity tokens\u00a0sent to you will be\u00a0encrypted under the same key\u00a0your system\u00a0uses for https.\u00a0 If people need help with this, let me know and I&amp;#39ll add instructions to this tutorial.<\/p>\n<p><img loading=\"lazy\" class=\"alignleft\" style=\"float: left;\" src=\"\/wp-content\/images\/2008\/09\/better_versions.jpg\" alt=\"\" width=\"281\" height=\"156\" \/>I\u00a0wrote my\u00a0sample code\u00a0in PHP 5\u00a0(I had a 4.2 version running at one point, but didn&amp;#39t want to keep two versions going).\u00a0\u00a0If you wonder why I chose PHP, I wanted\u00a0it to be clear\u00a0that InfoCards are not\u00a0Windows-specific.\u00a0 You need to make sure your version of PHP has the\u00a0<strong>mcrypt<\/strong> and <strong>openssl<\/strong> libraries\u00a0enabled.\u00a0\u00a0(By way of\u00a0example, these libraries are\u00a0part of the\u00a0default\u00a0environment at <a href=\"http:\/\/www.textdrive.com\">TextDrive<\/a>, my\u00a0excellent web site host.)<\/p>\n<p class=\"postnavigation\" style=\"font-size: 0.8em;\">I would suggest you approach this tutorial as follows:<\/p>\n<ol>\n<li>Watch the demo.\u00a0\u00a0Use <a href=\"\/wp-content\/resources\/simple-infocard-demo\/simple-infocard-demo.avi\" class=\"broken_link\">this version<\/a>\u00a0for Windows Media Player.\u00a0 (If your system complains that it requires the Techsmith Screen Capture Codec [TSCC], pick it up <a href=\"http:\/\/download.techsmith.com\/tscc\/tscc.exe\" class=\"broken_link\">here<\/a>.)\u00a0 If you can&amp;#39t use TSCC, try the much\u00a0fatter <a href=\"\/wp-content\/resources\/simple-infocard-demo\/simple-infocard-demo.mov\" class=\"broken_link\">Quicktime version<\/a> (doubleclick on the demo to start it).<\/li>\n<li>Learn about the <a href=\"https:\/\/www.identityblog.com\/codesample.php?simple-infocard-demo\/encrypted_token\" class=\"broken_link\">Encrypted SAML Token<\/a>, and then <a href=\"https:\/\/www.identityblog.com\/codesample.php?simple-infocard-demo\/decrypt_token\" class=\"broken_link\">how to decrypt it<\/a>\u00a0to\u00a0reveal the\u00a0signed token.<\/li>\n<li>Learn about the <a href=\"https:\/\/www.identityblog.com\/codesample.php?simple-infocard-demo\/signed_token\" class=\"broken_link\">Signed Token<\/a>, and <a href=\"https:\/\/www.identityblog.com\/codesample.php?simple-infocard-demo\/verify_token\" class=\"broken_link\">how to verify it<\/a>.<\/li>\n<li>Look at the sample <a href=\"https:\/\/www.identityblog.com\/codesample.php?simple-infocard-demo\/demo_token\" class=\"broken_link\">HTML page and mainline<\/a> that constitutes the demo.<\/li>\n<\/ol>\n<p>You can download the sample PHP files <a href=\"\/wp-content\/resources\/simple-infocard-demo\/simple-infocard-demo-v3.zip\" class=\"broken_link\">here<\/a>\u00a0(I updated them to V3 in June 2007 to make the code compatible with the shipping version of Vista, and at the same time embrace the new OASIS claims names.)<\/p>\n<p>I&amp;#39ll be evolving this work over the next little while, so let me know about anything that is unclear or not pitched at the right level.<\/p>\n<p>People have asked if I&amp;#39ll be\u00a0putting this tutorial\u00a0into .pdf format.\u00a0 I will, once I&amp;#39ve\u00a0received a bit more feedback.\u00a0 In particular, I&amp;#39m hoping some PHP gurus will look things over &#8211; this is my first PHP project.<\/p>\n<p>I&amp;#39ve also been asked\u00a0what intentions I have for this code. My only goal is to share information as widely as possible.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>THE ENCRYPTED TOKEN \u00bb A SELF-ISSUED INFOCARD TUTORIAL AND DEMO This tutorial includes a demo, an explanation of how Self-Issued InfoCard identity tokens work, and sample PHP code allowing you to accept\u00a0these tokens at a web site. One of the key goals of InfoCard and the Identity Metasystem is to\u00a0put the release of identity information &hellip; <a href=\"https:\/\/www.identityblog.com\/?p=430\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">SELF-ISSUED INFOCARD TUTORIAL AND DEMO<\/span><\/a><\/p>\n","protected":false},"author":68,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[2,1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.identityblog.com\/index.php?rest_route=\/wp\/v2\/posts\/430"}],"collection":[{"href":"https:\/\/www.identityblog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.identityblog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.identityblog.com\/index.php?rest_route=\/wp\/v2\/users\/68"}],"replies":[{"embeddable":true,"href":"https:\/\/www.identityblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=430"}],"version-history":[{"count":2,"href":"https:\/\/www.identityblog.com\/index.php?rest_route=\/wp\/v2\/posts\/430\/revisions"}],"predecessor-version":[{"id":1233,"href":"https:\/\/www.identityblog.com\/index.php?rest_route=\/wp\/v2\/posts\/430\/revisions\/1233"}],"wp:attachment":[{"href":"https:\/\/www.identityblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=430"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.identityblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=430"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.identityblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=430"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}