Here's the comment<http://books.google.com.au/books?id=cwjpG47z_7IC&pg=PT368&lpg=PT368&dq=%22we+can+then+detect+authentication+failure+from+the+client+side,+by+running+a+check+whenever+an+RPC%22&source=bl&ots=pxo8uMucSo&sig=x12Kzdg6i-lnGfIfNm6pMEGI3hE&hl=en&sa=X&ei=LwoYUNaGNs2ciAfEm4HICQ&ved=0CCsQ6AEwAA#v=onepage&q=%22we%20can%20then%20detect%20authentication%20failure%20from%20the%20client%20side%2C%20by%20running%20a%20check%20whenever%20an%20RPC%22&f=false> (Google Books), which was taken from this slice<http://www.web2pyslices.com/article/show/1375/json-rpc-from-javascript> .
Also, more importantly, is there a way to skip rewriting the frontend from scratch? To rephrase: *Can web2py views be generated for use on client-side?* Thanks for all information, Alec Taylor On Wed, Aug 1, 2012 at 2:37 AM, Massimo Di Pierro < [email protected]> wrote: > I am not sure what that comment means. How would you like to authenticate > using JSONRPC? basic_auth? You should be able to do that by enabling > basic_auth. > > The problem is that JSONRPC does have the concept of state therefore you > need to send credentials (basic_auth) in every request. Perhaps that is > what the comment mean. > > Massimo > > > On Tuesday, 31 July 2012 11:23:17 UTC-5, Alec Taylor wrote: >> >> Practically just finished my little proof-of-concept social-network >> backend (DAL+controller) & web-frontend (web2py views). >> >> Now I plan to make the mobile app with PhoneGap <http://phonegap.com>. >> PhoneGap allows you to create native mobile-apps for 7 different mobile >> platforms in HTML+JS+CSS. >> >> I plan on developing this frontend first by exposing JSONRPC methods >> server-side—by decorating controllers—then interfacing with the API on the >> client-side using JavaScript. >> >> Reading "web2py Application Development Cookbook", and on page 217 >> (chapter 7) it tells me that to make authentication work for RPC calls I >> need to break regular authentication methods. >> >> Is there a way to avoid this? — Note that I'm currently logging in using >> the normal method, but will be using Facebook auth in production. >> >> Also, if there is a way to avoid rewriting the frontend from scratch that >> will work with PhoneGap, please tell me. >> >> Thanks for all suggestions, >> >> Alec Taylor >> > -- > > > > --

