Note that there are some explanatory texts on larger screens.

plurals
  1. POPhoneGap - Approach to authenticate against a remote website?
    primarykey
    data
    text
    <p>I'm playing with PhoneGap for the first time. I'd like to do the following:</p> <p>Create a login UI in the file index.html like so:</p> <pre><code>&lt;input id="email"&gt; &lt;input id="password"&gt; &lt;button id="login"&gt;Login&lt;/button&gt; </code></pre> <p>The UI will appear on an iphone. When user clicks the login button, I want to asychronously authenticate against the website <a href="http://mysite.com/login">http://mysite.com/login</a>. If authentication fails, user stays on the index.html UI. If authentication succeeds, user sees a new UI found in dashboard.html, which looks like this:</p> <pre><code>&lt;ul&gt; &lt;li&gt;task 1&lt;/li&gt; &lt;li&gt;task 2&lt;/li&gt; &lt;li&gt;task 3 etc... (asychronously retrieve data from http://mysite.com)&lt;/li&gt; &lt;/ul&gt; </code></pre> <p>The user can perform asynchronous actions against the list in dashboard.html. So to do this, the server-side scripts must always check to see if user has the appropriate permissions.</p> <p>SO my questions are:</p> <p><strong>1) I've outlined what I'd like to achieve, but i've also suggested web-development philsophy to solving the problem. Is there a better overall approach?</strong></p> <p>2) Which asynchronous technology should I use? Ajax, webservice, something else?</p> <p>3) Can I still use SESSION on the server side to maintain user session data like user_id, roles, permissions etc... That way the client machine doesn't have to transmit this data with every asynchronous call?</p>
    singulars
    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.
 

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