Permalink
Browse files

added compressed

  • Loading branch information...
thinkphp committed Mar 19, 2012
1 parent ef5570a commit 20ca960ed30346da35d7ac63b5d9b6d8808058da
Showing with 18 additions and 0 deletions.
  1. +18 −0 Demos/browserID-yui-compressed.js
@@ -0,0 +1,18 @@
+/*
+---
+description: This is a MooTools client library for the BrowserID Protocol
+
+authors:
+- Adrian Statescu (http://thinkphp.ro)
+
+license:
+- MIT-style license
+
+requires:
+ core/1.4.5: '*'
+
+provides: BrowserID
+...
+*/
+
+var BrowserID=new Class({Implements:[Options,Events],options:{assertion:null,email:null,service:"login.php"},initialize:function(assertion,options){this.setOptions(options);this.options.assertion=assertion;this._verify_assertion();},_verify_assertion:function(){var request=new Request.JSON({url:"login.php",data:{assertion:this.options.assertion},onRequest:function(){if(window.console){console.log("Requesting...");}this.fireEvent("request");}.bind(this),onComplete:function(response){if(window.console){console.log("Completed...");}if(response.status&&response.status=="okay"){this.options.email=response.email;}this.fireEvent("complete",[response]);}.bind(this)}).send();}});

0 comments on commit 20ca960

Please sign in to comment.