Alright, I think I got what you want now. The first solution that comes to mind is to perform everything in the browser. That way, you will first perform "window.open()" and then show a "login view" from django server.
I don't have any experience with Phonegap, but it seems that this can also help you: http://docs.phonegap.com/en/edge/cordova_inappbrowser_inappbrowser.md.html#addEventListener Maybe if you attach a "loadstart" event to the browser and save user credentials to "localStorage" or a cookie, using the method described here: http://blogs.telerik.com/appbuilder/posts/13-12-23/cross-window-communication-with-cordova's-inappbrowser Since everything will be working in a common browser application (not a single page application, or phonegap app), I'd suggest you to work with default Django cookie session and not with a token based authentication. This will be simpler since once you set the cookie, the browser will take care off passing it over page requests and you will not need to make customisations to your Django views regarding authentication. On Fri, Mar 13, 2015 at 4:53 PM, Florian Auer <f.c.a...@gmail.com> wrote: > Hello Filipe > > Thank you for the reply. > Well the $http object was till now unknown for me.. there we can see how > poor my AngularJS knowledge is till now. > > But as far as i understood the documentation i am not able to bring up a > browser window by this that takes over the control of the app. > > > The idea behind all is the following, maybe i did not describe it well. > > The App is only thought a a "startUp wrapper" with stored credentials in > form of a login token. > That token is claimed in a first asynchronous request with user > credentials asked for interactively. > Later on when the token is known, the app only sets the headers an calls > the django web page where the user gets logged in due the header > automatically. > > At the moment I was using the JWT ( > http://getblimp.github.io/django-rest-framework-jwt/) to claim a token. > But i do not know how to use this to let the user been logged in with the > call of a browser window. > Maybe I need tho turn over to TokenBasedAuthentification like described in > ( > http://www.django-rest-framework.org/api-guide/authentication/#tokenauthentication > )? > But then I will still have the same problem... How to bring the token into > the headers and thenn call a page from the server rendered inside the > browser in UI mode (not in the app as sub page) > > My idea was, that an phonegap app is nothing more than a browser rendered > app. > When I can create a request to a server to claim an Auth Token and be able > to set this into the headers, the next Ui request to the server (launching > another browser window by window.open()) will let me call directly to a > restricted view. > > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at http://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/db6f6050-b1b9-4ea4-9729-94a3184c5e82%40googlegroups.com > <https://groups.google.com/d/msgid/django-users/db6f6050-b1b9-4ea4-9729-94a3184c5e82%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- *Filipe Ximenes*+55 (81) 8245-9204 *Vinta Software Studio*http://www.vinta.com.br -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAA-QWB2avGQ-c2twL%3DAsM5rgzbuJ3U0G6wNS-4oeMSUARJ2rUA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.