---+ WebID-based Email Verification in ODS VERY rough draft doc... %TOC% ---++ Prerequisites 1 Get an ODS account and edit your profile, using one of these tools -- * HTML and Javascript -- http://<cname>/javascript/users/users.html, e.g.: http://id.myopenlink.net/javascript/users/users.html * Virtuoso Server Pages (VSP) -- http://<cname>/vsp/users/users.vsp, e.g: http://id.myopenlink.net/vsp/users/users.vsp * PHP-based server pages -- http://<cname>/php/users/users.php, e.g: http://id.myopenlink.net/php/users/users.php ---++ Simple Browser-based demonstration To verify an email address (i.e., a mailto: scheme URI) -- 1. Go to: http://id.myopenlink.net/mv/ or http://ods-qa.openlinksw.com/mv/ 2. Enter your email address 3. Check your mail box for a message that includes a URL to a Resource protected by a WebID-based ACL. Clicking on the URL results in the creation of a triple in the host data space, associating your WebID with the sha1sum-based hash of the verified email address. (The Graph IRI is of the form: http://<data-space-cname>/mv/data/{data-space-generated-hash}.) 4. Check your results with SPARQL or cURL against https://<dataspace-cname>/mv/mc.vsp?confirm=<emailHash> ---++ Detailed demonstration, similar to above, using cURL on the command-line ---+++ Pass Your Email Address as a URL parameter * entry endpoint: http://<dataspace-cname>/mv/mv.vsp * parameters: mbox = <email address> ---++++ Example curl -H "Accept:application/json" -i http://id.myopenlink.net/mv/mv.vsp?mbox={YourEmailAddress} {"status":"ok", "message":"A confirmation mail was sent, please check your mail box."} ---+++ Verify Your Email via a URL to a Resource protected by a WebID-based ACL * verification endpoint: https://<dataspace-cname>/mv/mc.vsp * parameters: confirm = <hash-sent-via-email> * authentication: use the PEM file associated with your WebID. ---++++ Verification $ curl -k -H "Accept:application/json, */*;q=0.1" -i -E .pem: https:///mv/mc.vsp?confirm= {"status":"verified", "document_url":"http:///mv/data/f7fa16ed3c806045faa3109e83b9e3581419fb40"} * Graph IRI for data created in data space: http://<data-space-cname>/mv/data/{data-space-generated-hash} ---+++ Access Example ---++++ JSON # curl -i -L -H "Accept: application/json" http://ods-qa.openlinksw.com/mv/data/afacf6b868e6cb36f71d2cecc6d531a26ce1f2ef HTTP/1.1 303 See Other Server: Virtuoso/06.02.3130 (Linux) x86_64-generic-linux-glibc25-64 VDB Connection: close Content-Type: text/html; charset=UTF-8 Date: Sat, 30 Jul 2011 20:36:16 GMT Accept-Ranges: bytes Location: http://ods-qa.openlinksw.com/sparql?query=construct%20%7B%20%3Fs%20%3Fp%20%3Fo%20.%20%3Ft%20%3Ftp%20%3Fto%20.%20%7D%20%20from%20%3Chttp%3A%2F%2Flocalhost%2Fmv%3E%20where%20%7B%20%3Fs%20%3Fp%20%3Fo%20%20.%20%3Fs%20foaf%3AprimaryTopic%20%3Ft%20.%20%3Ft%20%3Ftp%20%3Fto%20.%20filter%20%28%3Fs%20%3D%20%3Chttp%3A%2F%2Fods-qa.openlinksw.com%2Fmv%2Fdata%2Fafacf6b868e6cb36f71d2cecc6d531a26ce1f2ef%3E%20%29%20%7D%20&format= Content-Length: 0 HTTP/1.1 200 OK Server: Virtuoso/06.02.3130 (Linux) x86_64-generic-linux-glibc25-64 VDB Connection: Keep-Alive Date: Sat, 30 Jul 2011 20:36:16 GMT Accept-Ranges: bytes Content-Type: application/json; charset=UTF-8 Content-Length: 413 { "http://ods-qa.openlinksw.com/dataspace/person/kidehen#this" : { "http://xmlns.com/foaf/0.1/mbox_sha1sum" : [ { "type" : "literal", "value" : "r6z2uGjmyzb3HSzsxtUxomzh8u8=" } ] } , "http://ods-qa.openlinksw.com/mv/data/afacf6b868e6cb36f71d2cecc6d531a26ce1f2ef" : { "http://xmlns.com/foaf/0.1/primaryTopic" : [ { "type" : "uri", "value" : "http://ods-qa.openlinksw.com/dataspace/person/kidehen#this" } ] } } ---++++ Microdata+JSON # curl -i -L -H "Accept: application/json" http://ods-qa.openlinksw.com/mv/data/afacf6b868e6cb36f71d2cecc6d531a26ce1f2ef HTTP/1.1 303 See Other Server: Virtuoso/06.02.3130 (Linux) x86_64-generic-linux-glibc25-64 VDB Connection: close Content-Type: text/html; charset=UTF-8 Date: Sat, 30 Jul 2011 20:36:16 GMT Accept-Ranges: bytes Location: http://ods-qa.openlinksw.com/sparql?query=construct%20%7B%20%3Fs%20%3Fp%20%3Fo%20.%20%3Ft%20%3Ftp%20%3Fto%20.%20%7D%20%20from%20%3Chttp%3A%2F%2Flocalhost%2Fmv%3E%20where%20%7B%20%3Fs%20%3Fp%20%3Fo%20%20.%20%3Fs%20foaf%3AprimaryTopic%20%3Ft%20.%20%3Ft%20%3Ftp%20%3Fto%20.%20filter%20%28%3Fs%20%3D%20%3Chttp%3A%2F%2Fods-qa.openlinksw.com%2Fmv%2Fdata%2Fafacf6b868e6cb36f71d2cecc6d531a26ce1f2ef%3E%20%29%20%7D%20&format= Content-Length: 0 HTTP/1.1 200 OK Server: Virtuoso/06.02.3130 (Linux) x86_64-generic-linux-glibc25-64 VDB Connection: Keep-Alive Date: Sat, 30 Jul 2011 20:36:16 GMT Accept-Ranges: bytes Content-Type: application/json; charset=UTF-8 Content-Length: 413 { "http://ods-qa.openlinksw.com/dataspace/person/kidehen#this" : { "http://xmlns.com/foaf/0.1/mbox_sha1sum" : [ { "type" : "literal", "value" : "r6z2uGjmyzb3HSzsxtUxomzh8u8=" } ] } , "http://ods-qa.openlinksw.com/mv/data/afacf6b868e6cb36f71d2cecc6d531a26ce1f2ef" : { "http://xmlns.com/foaf/0.1/primaryTopic" : [ { "type" : "uri", "value" : "http://ods-qa.openlinksw.com/dataspace/person/kidehen#this" } ] } } ---++++ N3 # curl -i -L -H "Accept: text/n3" http://ods-qa.openlinksw.com/mv/data/afacf6b868e6cb36f71d2cecc6d531a26ce1f2ef HTTP/1.1 303 See Other Server: Virtuoso/06.02.3130 (Linux) x86_64-generic-linux-glibc25-64 VDB Connection: close Content-Type: text/html; charset=UTF-8 Date: Sat, 30 Jul 2011 20:38:06 GMT Accept-Ranges: bytes Location: http://ods-qa.openlinksw.com/sparql?query=construct%20%7B%20%3Fs%20%3Fp%20%3Fo%20.%20%3Ft%20%3Ftp%20%3Fto%20.%20%7D%20%20from%20%3Chttp%3A%2F%2Flocalhost%2Fmv%3E%20where%20%7B%20%3Fs%20%3Fp%20%3Fo%20%20.%20%3Fs%20foaf%3AprimaryTopic%20%3Ft%20.%20%3Ft%20%3Ftp%20%3Fto%20.%20filter%20%28%3Fs%20%3D%20%3Chttp%3A%2F%2Fods-qa.openlinksw.com%2Fmv%2Fdata%2Fafacf6b868e6cb36f71d2cecc6d531a26ce1f2ef%3E%20%29%20%7D%20&format= Content-Length: 0 HTTP/1.1 200 OK Server: Virtuoso/06.02.3130 (Linux) x86_64-generic-linux-glibc25-64 VDB Connection: Keep-Alive Date: Sat, 30 Jul 2011 20:38:06 GMT Accept-Ranges: bytes Content-Type: text/n3; charset=UTF-8 Content-Length: 305 @prefix foaf: . @prefix ns1: . ns1:this foaf:mbox_sha1sum "r6z2uGjmyzb3HSzsxtUxomzh8u8=" . @prefix ns2: . ns2:afacf6b868e6cb36f71d2cecc6d531a26ce1f2ef foaf:primaryTopic ns1:this ---++++ HTML+Microdata curl -i -L -H "Accept: text/html" http://ods-qa.openlinksw.com/mv/data/afacf6b868e6cb36f71d2cecc6d531a26ce1f2ef HTTP/1.1 303 See Other Server: Virtuoso/06.02.3130 (Linux) x86_64-generic-linux-glibc25-64 VDB Connection: close Content-Type: text/html; charset=UTF-8 Date: Sat, 30 Jul 2011 20:41:32 GMT Accept-Ranges: bytes Location: http://ods-qa.openlinksw.com/sparql?query=construct%20%7B%20%3Fs%20%3Fp%20%3Fo%20.%20%3Ft%20%3Ftp%20%3Fto%20.%20%7D%20%20from%20%3Chttp%3A%2F%2Flocalhost%2Fmv%3E%20where%20%7B%20%3Fs%20%3Fp%20%3Fo%20%20.%20%3Fs%20foaf%3AprimaryTopic%20%3Ft%20.%20%3Ft%20%3Ftp%20%3Fto%20.%20filter%20%28%3Fs%20%3D%20%3Chttp%3A%2F%2Fods-qa.openlinksw.com%2Fmv%2Fdata%2Fafacf6b868e6cb36f71d2cecc6d531a26ce1f2ef%3E%20%29%20%7D%20&format= Content-Length: 0 HTTP/1.1 200 OK Server: Virtuoso/06.02.3130 (Linux) x86_64-generic-linux-glibc25-64 VDB Connection: Keep-Alive Date: Sat, 30 Jul 2011 20:41:32 GMT Accept-Ranges: bytes Content-Type: text/html; charset=UTF-8 Content-Length: 1558 HTML Microdata document

This document contains 2 facts in HTML Microdata format.

A generic web browser may not display them properly but the document can be saved on disk and used by some appropriate program or sent to a third party. Use "Save As" or "Send To" menu item of the browser; choose "HTML" file type, not "text file" or "web archive".

The rest of the document may look like garbage for humans or not displayed by the browser.

Prefix Namespace IRI
xsdh http://www.w3.org/2001/XMLSchema#
n2 http://ods-qa.openlinksw.com/mv/data/
n3 http://xmlns.com/foaf/0.1/
n4 http://ods-qa.openlinksw.com/dataspace/person/kidehen#
rdf http://www.w3.org/1999/02/22-rdf-syntax-ns#
Subject Item
n4:this
n3:mbox_sha1sum
r6z2uGjmyzb3HSzsxtUxomzh8u8=
Subject Item
n2:afacf6b868e6cb36f71d2cecc6d531a26ce1f2ef
n3:primaryTopic
n4:this
---++++ XHTML+RDFa curl -i -L -H "Accept: application/xhtml+xml" http://ods-qa.openlinksw.com/mv/data/afacf6b868e6cb36f71d2cecc6d531a26ce1f2ef HTTP/1.1 303 See Other Server: Virtuoso/06.02.3130 (Linux) x86_64-generic-linux-glibc25-64 VDB Connection: close Content-Type: text/html; charset=UTF-8 Date: Sat, 30 Jul 2011 20:44:59 GMT Accept-Ranges: bytes Location: http://ods-qa.openlinksw.com/sparql?query=construct%20%7B%20%3Fs%20%3Fp%20%3Fo%20.%20%3Ft%20%3Ftp%20%3Fto%20.%20%7D%20%20from%20%3Chttp%3A%2F%2Flocalhost%2Fmv%3E%20where%20%7B%20%3Fs%20%3Fp%20%3Fo%20%20.%20%3Fs%20foaf%3AprimaryTopic%20%3Ft%20.%20%3Ft%20%3Ftp%20%3Fto%20.%20filter%20%28%3Fs%20%3D%20%3Chttp%3A%2F%2Fods-qa.openlinksw.com%2Fmv%2Fdata%2Fafacf6b868e6cb36f71d2cecc6d531a26ce1f2ef%3E%20%29%20%7D%20&format= Content-Length: 0 HTTP/1.1 200 OK Server: Virtuoso/06.02.3130 (Linux) x86_64-generic-linux-glibc25-64 VDB Connection: Keep-Alive Date: Sat, 30 Jul 2011 20:44:59 GMT Accept-Ranges: bytes Content-Type: application/xhtml+xml; charset=UTF-8 Content-Length: 1159 RDFa+XHTML document

This document contains 2 facts in XHTML+RDFa format.

A generic web browser may not display them but the document can be saved on disk and used by some appropriate program or sent to a third party. Use "Save As" or "Send To" menu item of the browser; choose "HTML" file type, not "text file" or "web archive".

The rest of the document may look like garbage for humans or not displayed by the browser.

r6z2uGjmyzb3HSzsxtUxomzh8u8=
---++++ RDF/XML curl -i -L -H "Accept: application/rdf+xml" http://ods-qa.openlinksw.com/mv/data/afacf6b868e6cb36f71d2cecc6d531a26ce1f2ef HTTP/1.1 303 See Other Server: Virtuoso/06.02.3130 (Linux) x86_64-generic-linux-glibc25-64 VDB Connection: close Content-Type: text/html; charset=UTF-8 Date: Sat, 30 Jul 2011 20:56:06 GMT Accept-Ranges: bytes Location: http://ods-qa.openlinksw.com/sparql?query=construct%20%7B%20%3Fs%20%3Fp%20%3Fo%20.%20%3Ft%20%3Ftp%20%3Fto%20.%20%7D%20%20from%20%3Chttp%3A%2F%2Flocalhost%2Fmv%3E%20where%20%7B%20%3Fs%20%3Fp%20%3Fo%20%20.%20%3Fs%20foaf%3AprimaryTopic%20%3Ft%20.%20%3Ft%20%3Ftp%20%3Fto%20.%20filter%20%28%3Fs%20%3D%20%3Chttp%3A%2F%2Fods-qa.openlinksw.com%2Fmv%2Fdata%2Fafacf6b868e6cb36f71d2cecc6d531a26ce1f2ef%3E%20%29%20%7D%20&format= Content-Length: 0 HTTP/1.1 200 OK Server: Virtuoso/06.02.3130 (Linux) x86_64-generic-linux-glibc25-64 VDB Connection: Keep-Alive Date: Sat, 30 Jul 2011 20:56:06 GMT Accept-Ranges: bytes Content-Type: application/rdf+xml; charset=UTF-8 Content-Length: 641 r6z2uGjmyzb3HSzsxtUxomzh8u8= CategoryInternal