Note that there are some explanatory texts on larger screens.

plurals
  1. PObrowserID server logout
    primarykey
    data
    text
    <p>so i found this <a href="https://browserid.org/" rel="nofollow">browserid.org</a> and then this [browserid.org/developers] and decided i would like to try this new authentication method that is browserID. after digging in to the only semi official example i could find ( <a href="https://github.com/lloyd/myfavoritebeer.org/" rel="nofollow">browserid_favbeer_example</a> ) and flipping back and forth to the 3 easy steps page i am still puzzled. i searched around a bit and found one, the javascript implementation can be easily exploited (for right now) and two, from a very nice fellow, the example below. the first thing i noticed it missing was the logout. if anybody could be so kind as to help me complete the logout it would be much appreciated. </p> <pre><code>&lt;?php /* * Simple implementation of Mozilla BrowserID (see https://browserid.org/) * Author : Guillaume &lt;guillaume@atto.be&gt; */ /* * Usage : * $browserid = new BrowserID('mywebserver.com', $_POST['assertion']); if($browserid-&gt;verify_assertion()) { echo('Welcome, your email is '.$browserid-&gt;get_email()); } */ class BrowserID { private $audience; private $assertion; private $email; private $validity; private $issuer; private function post_request($url, $data) { $params = array('http' =&gt; array('method' =&gt; 'POST', 'content' =&gt; $data)); return stream_get_contents($fp); } else { return FALSE; } } public function BrowserID($audience, $assertion) { $this-&gt;audience = $audience; $this-&gt;assertion = $assertion; } /* * Send the assertion to the browserid.org server (this must be over HTTPS) * The response is read to determine is the assertion is authentic */ public function verify_assertion() { if(isset($result['status']) &amp;&amp; $result['status'] == 'okay') { $this-&gt;email = $result['email']; $this-&gt;validity = $result['valid-until']; $this-&gt;issuer = $result['issuer']; return true; } else { return false; } } public function get_email() { return $this-&gt;email; } public function get_validity() return $this-&gt;email; } public function get_validity() * Usage : * $browserid = new BrowserID('mywebserver.com', $_POST['assertion']); if($browserid-&gt;verify_assertion()) { echo('Welcome, your email is '.$browserid-&gt;get_email()); } */ class BrowserID { private $audience; private $assertion; private $email; private $validity; private $issuer; private function post_request($url, $data) { $params = array('http' =&gt; array('method' =&gt; 'POST', 'content' =&gt; $data)); return stream_get_contents($fp); } else { return FALSE; } } public function BrowserID($audience, $assertion) { $this-&gt;audience = $audience; $this-&gt;assertion = $assertion; } /* * Send the assertion to the browserid.org server (this must be over HTTPS) * The response is read to determine is the assertion is authentic */ public function verify_assertion() { if(isset($result['status']) &amp;&amp; $result['status'] == 'okay') { $this-&gt;email = $result['email']; $this-&gt;validity = $result['valid-until']; $this-&gt;issuer = $result['issuer']; return true; } else { return false; } } public function get_email() { return $this-&gt;email; } public function get_validity() { return $this-&gt;validity; } public function get_issuer() { return $this-&gt;issuer; } }// end class BrowserID $browserid = new BrowserID($_SERVER['HTTP_HOST'], $_POST['assertion']); if($browserid-&gt;verify_assertion()) { echo('Welcome '.$browserid-&gt;get_email()); } else { echo('Identification failure'); } ?&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload