diff --git a/browserid/app.js b/browserid/app.js index 3c4ecd0d904b7f1d97a57eb751ecf10ea7d5fd3e..26ea69ba16a6f6fae8af8cdf895da9f44ae0aa64 100644 --- a/browserid/app.js +++ b/browserid/app.js @@ -32,6 +32,7 @@ function router(app) { // simple redirects (internal for now) app.get('/sign_in', internal_redirector('/dialog/index.html')); app.get('/register_iframe', internal_redirector('/dialog/register_iframe.html')); + app.get('/privacy', internal_redirector('/privacy.html')); // register all the WSAPI handlers wsapi.setup(app); diff --git a/browserid/static/index.html b/browserid/static/index.html index 7d6b955d9e9daebe18586670496a7d7487f24a6a..14d542b478eb38cacf6f9c34a63aa6963dbc3ae2 100644 --- a/browserid/static/index.html +++ b/browserid/static/index.html @@ -35,7 +35,7 @@ <a href="https://mozillalabs.com">mozilla labs</a>.</p> </div> <div class="left"> - <p> <a href="https://github.com/mozilla/browserid">Source Code</a> <a href="https://wiki.mozilla.org/Identity/Verified_Email_Protocol">Specification</a> <a href="https://groups.google.com/forum/?hl=en#!forum/mozilla.dev.identity">Mailing list</a> </p> + <p> <a href="https://github.com/mozilla/browserid">Source Code</a> <a href="https://wiki.mozilla.org/Identity/Verified_Email_Protocol">Specification</a> <a href="https://groups.google.com/forum/?hl=en#!forum/mozilla.dev.identity">Mailing list</a> <a href="/privacy">Privacy</a> </p> <p class="copyright">Copyright © 2011 Mozilla. All rights reserved. </p> </div> </div> diff --git a/browserid/static/privacy.html b/browserid/static/privacy.html new file mode 100644 index 0000000000000000000000000000000000000000..e88e177959f93e8980312ba68e464593f37e26f3 --- /dev/null +++ b/browserid/static/privacy.html @@ -0,0 +1,110 @@ +<!DOCTYPE html> +<html> +<head> + <meta http-equiv="Content-type" content="text/html; charset=utf-8"> + <title>BrowserID - Privacy and Terms of Service</title> + <link rel="stylesheet" href="css/style.css" type="text/css"> +</head> +<body onload="display_saved_ids()"> +<div id="splash"> + <div class="topquarter"> + <div> + <a href="/"><div class="title"><img src="i/browserid_logo_lil.png"></div></a> + <div class="subtitle">Privacy and Terms of Service</div> + </div> + </div> + <div class="bottomhalf"> + <div class="why"> + <p> + Privacy Policy and Terms of Service + </p> + </div> + <div> + to be filled in soon + </div> + </div> + <div class="footer"> + <div> + <div class="right"> + <p><img src="i/browserid_logo_sm.png"> is an <b>open source experiment</b> into improving identity and authentication on the web, by + <a href="https://mozillalabs.com">mozilla labs</a>.</p> + </div> + <div class="left"> + <p> <a href="https://github.com/mozilla/browserid">Source Code</a> <a href="https://wiki.mozilla.org/Identity/Verified_Email_Protocol">Specification</a> <a href="http://groups.google.com/group/mozilla-labs">Mailing list</a> </p> + <p class="copyright">Copyright © 2011 Mozilla. All rights reserved. </p> + </div> + </div> + </div> +</div> +</body> +<script src="dialog/jquery-min.js"></script> +<script src="dialog/underscore-min.js"></script> +<script> +function display_saved_ids() +{ + var emails = {}; + if (window.localStorage.emails) { + emails = JSON.parse(window.localStorage.emails); + } + + $('#cancellink').click(function() { + if (confirm('Are you sure you want to cancel your account?')) { + $.post("/wsapi/account_cancel", {}, function(result) { + window.localStorage.emails = null; + document.location="/"; + }); + } + }); + + $("#emailList").empty(); + _(emails).each(function(data, e) { + var block = $("<div>").addClass("emailblock"); + var label = $("<div>").addClass("email").text(e); + var meta = $("<div>").addClass("meta"); + + /* + var priv = $("<div class='keyblock'>").text(data.priv); + priv.hide(); + */ + + var pub = $("<div class='keyblock'>").text(data.pub); + pub.hide(); + var linkblock = $("<div>"); + var puba = $("<a>").text("[show public key]"); + // var priva = $("<a>").text("[show private key]"); + puba.click(function() {pub.show()}); + // priva.click(function() {priv.show()}); + linkblock.append(puba); + // linkblock.append(" / "); + // linkblock.append(priva); + + var deauth = $("<button>").text("Forget this Email"); + meta.append(deauth); + deauth.click(function() { + var t = JSON.parse(window.localStorage.emails); + delete t[e]; + window.localStorage.emails = JSON.stringify(t); + // remove email from server + $.post("/wsapi/remove_email", {"email" : e}, function(response) { + alert("response is : " +response); + display_saved_ids(); + }); + }); + + var d = new Date(data.created); + var datestamp = $("<div class='date'>").text("Logged in at " + d.getHours() + ":" + d.getMinutes() + ":" + d.getSeconds() + ", " + d.getMonth() + "/" + d.getDay() + "/" + d.getUTCFullYear()); + + meta.append(datestamp); + meta.append(linkblock); + + block.append(label); + block.append(meta); + // block.append(priv); + block.append(pub); + + $("#emailList").append(block); + }); +} +</script> + +</html> diff --git a/run.js b/run.js index 24fdd5908e5ccd99b4622769b67fb72c3d9347d6..1f0a8a6a17c1d549a03939d717d568364491e5ce 100755 --- a/run.js +++ b/run.js @@ -144,11 +144,15 @@ var dirs = [ name: "http://rp.eyedee.me", path: path.join(__dirname, "rp") }, - // A reference primary identity provider. + + // disabled primary for now since it's not in working + // order. + /* // A reference primary identity provider. { name: "https://eyedee.me", path: path.join(__dirname, "primary") - }, + }, */ + // BrowserID: the secondary + ip + more. { name: "https://browserid.org",