Permalink
Browse files

Initial commit of working IdP

  • Loading branch information...
0 parents commit 4c4af94102e48f6c274e8afc5c66599fe4d47ce6 @callahad committed Apr 2, 2012
@@ -0,0 +1,16 @@
+MockMyID
+========
+
+MockMyID is a BrowserID Identity Provider (IdP) that will gladly issue
+assertions to anyone and everyone, without a second thought.
+
+It's like Mailinator, for BrowserID.
+
+It's especially useful for testing and demoing sites that depend on BrowserID,
+since you don't have to set up email or accounts beforehand.
+
+How Do I Use It?
+----------------
+
+Whenever you're asked to log in with BrowserID, just make up any email address
+you want `@mockmyid.com`.
@@ -0,0 +1,8 @@
+{
+ "public-key": {
+ "algorithm": "RS",
+ "n": "15498874758090276039465094105837231567265546373975960480941122651107772824121527483107402353899846252489837024870191707394743196399582959425513904762996756672089693541009892030848825079649783086005554442490232900875792851786203948088457942416978976455297428077460890650409549242124655536986141363719589882160081480785048965686285142002320767066674879737238012064156675899512503143225481933864507793118457805792064445502834162315532113963746801770187685650408560424682654937744713813773896962263709692724630650952159596951348264005004375017610441835956073275708740239518011400991972811669493356682993446554779893834303",
+ "e": "65537"},
+ "authentication": "/browserid/sign_in.html",
+ "provisioning": "/browserid/provision.html"
+}
@@ -0,0 +1,35 @@
+<!doctype html>
+<html>
+ <head>
+ <title>MockMyID Provisioning</title>
+ </head>
+ <body>
+ <script src="https://browserid.org/provisioning_api.js"></script>
+ <script src="vepbundle.js"></script>
+ <script type="text/javascript">
+ navigator.id.beginProvisioning(function(email, cert_duration_s) {
+ navigator.id.genKeyPair(function(pubkey) {
+ var jwk = require('/jwk');
+ var jwcert = require('/jwcert');
+
+ var secKey = jwk.SecretKey.fromSimpleObject({
+ algorithm: 'RS',
+ n: '15498874758090276039465094105837231567265546373975960480941122651107772824121527483107402353899846252489837024870191707394743196399582959425513904762996756672089693541009892030848825079649783086005554442490232900875792851786203948088457942416978976455297428077460890650409549242124655536986141363719589882160081480785048965686285142002320767066674879737238012064156675899512503143225481933864507793118457805792064445502834162315532113963746801770187685650408560424682654937744713813773896962263709692724630650952159596951348264005004375017610441835956073275708740239518011400991972811669493356682993446554779893834303',
+ e: '65537',
+ d: '6539906961872354450087244036236367269804254381890095841127085551577495913426869112377010004955160417265879626558436936025363204803913318582680951558904318308893730033158178650549970379367915856087364428530828396795995781364659413467784853435450762392157026962694408807947047846891301466649598749901605789115278274397848888140105306063608217776127549926721544215720872305194645129403056801987422794114703255989202755511523434098625000826968430077091984351410839837395828971692109391386427709263149504336916566097901771762648090880994773325283207496645630792248007805177873532441314470502254528486411726581424522838833'
+ });
+
+ var pubkey = jwk.PublicKey.fromSimpleObject(pubkey);
+
+ var expiration = new Date().valueOf() + (cert_duration_s * 1000);
+
+ var certificate = new jwcert.JWCert(
+ 'mockmyid.com', expiration, new Date(), pubkey, {email: email}
+ ).sign(secKey);
+
+ navigator.id.registerCertificate(certificate);
+ });
+ });
+ </script>
+ </body>
+</html>
@@ -0,0 +1,9 @@
+<!doctype html>
+<html>
+ <head>
+ <title>MockMyID Sign In</title>
+ </head>
+ <body>
+ You should never need to visit this page.
+ </body>
+</html>
Oops, something went wrong.

0 comments on commit 4c4af94

Please sign in to comment.