<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 23 Sep,2013, at 10:38 , Apostolos Emmanouilidis &lt;<a href="mailto:aemmanou@redhat.com">aemmanou@redhat.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">


  <meta http-equiv="Content-Type" content="text/html; CHARSET=UTF-8">
  <meta name="GENERATOR" content="GtkHTML/4.6.4">

<div>
+ 1<br>
<br>
Personally, I like your implementation with the callbacks :)&nbsp; <br></div></blockquote><div><br></div><div>Because of it's &nbsp;asynchronous nature, you'll have no other option to embrace that.</div><br><blockquote type="cite"><div>
<br>
Regarding [1] I would prefer declaring and giving meaningful names in callback functions and then passing just the names, instead of passing anonymous functions. I think this way is more readable and makes JavaScript code cleaner.<br></div></blockquote><div><br></div><div>Good point changed that...</div><br><blockquote type="cite"><div>
<br>
[1]: <a href="https://github.com/edewit/aerogear-otp-cordova/blob/master/example/js/index.js#L40">https://github.com/edewit/aerogear-otp-cordova/blob/master/example/js/index.js#L40</a><br>
<br>
<br>
On Mon, 2013-09-23 at 08:38 +0200, Erik Jan de Wit wrote:
<blockquote type="CITE">
    <h2>
<b><font size="5">One Time Password</font></b>
</h2>
    I've checked in the&nbsp;<a href="https://github.com/edewit/aerogear-otp-cordova">cordova otp</a>&nbsp;module&nbsp;it now supports Android and iOS, I've added a dependency on the barcode scanner plugin so that it is a complete package. There is one general&nbsp;<tt>generate</tt>&nbsp;method that will check if there is a secret stored if not it will fire up the barcode scanner to scan a secret and then store it. There are also separate methods that support these functions.<br>
    <br>
    On the android side I use SharedPreferences and for iOS NSUserDefaults to store the secret. Currently the project is under my own name don't know how to move it.<br>
    <br>
    As this is a security thing it would be great if others would take a look at because we want to be extra sure there is no obvious security hole in this.<br>
    <br>
    Cheers,&nbsp;Erik Jan<br>
    <br>
<pre>_______________________________________________
aerogear-dev mailing list
<a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a>
</pre>
</blockquote>
<br>
</div>

_______________________________________________<br>aerogear-dev mailing list<br><a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>https://lists.jboss.org/mailman/listinfo/aerogear-dev</blockquote></div><br></body></html>