Hi, I've implemented a Guard like this round about a year before. I returned another state as 401 (I've used the undefined state 491) returned by the AJAX request. Than the JavaScript reads it, and know, what happens.
best regards Stephan Jerome Louvel schrieb: > Hi Fabian, > > This is great! You could customize the Restlet Guard (or Authenticator) to > not return the HTTP status that triggers the dialog in Firefox. > > I'm looking forward for a clean solution to this common problem. > > Best regards, > Jerome Louvel > -- > Restlet ~ Founder and Lead developer ~ http://www.restlet.org > Noelios Technologies ~ Co-founder ~ http://www.noelios.com > > -----Message d'origine----- > De : Fabian Mandelbaum [mailto:[email protected]] > Envoyé : jeudi 6 août 2009 16:57 > À : [email protected] > Objet : Re: HTTPBAsic auth > > Hello Jerome, Stefan > > I'm working on a solution like this for our system with a procedure > similar to this one: > > http://www.peej.co.uk/articles/rich-user-experience.html > > Works like a charm on IE (8 and 7), works rather fine on Firefox (if you > input bad credentials, the browser presents the 'ugly' login popup), > didn't try on other browsers. > > If I can polish my code in a way that works fine in all major browsers > (at least IE, FF and Safari), without external dependencies (read: pure > Javascript), I'll share it with you with pleasure (The system I'm > developing is OpenSource anyway ;)). > > This is a badly needed use case for developers of web apps (read: with a > UI), so we may find a way to integrate a proven solution to the already > excellent Restlet framework. > > Jerome Louvel wrote: > >> Hi Stefan, >> >> You might be able to leverage AJAX to pre-authenticate your browser session >> using a Web form as input for login/pwd. Normally the subsequent request >> should be preauthenticated by your browser. >> >> You need to test this first as I haven't done this explicitly before. Worth >> a try... :) >> >> Best regards, >> Jerome Louvel >> -- >> Restlet ~ Founder and Lead developer ~ http://www.restlet.org >> Noelios Technologies ~ Co-founder ~ http://www.noelios.com >> >> >> >> -----Message d'origine----- >> De : Stefan Riffert [mailto:[email protected]] >> Envoyé : mercredi 29 juillet 2009 11:42 >> À : [email protected] >> Objet : HTTPBAsic auth >> >> Hello, >> >> i am devloping a server side application with retslet 1.1.2. >> Most of the Resources require authorization and are represented >> depending on the users level. So far, I use the HTTP Basic >> authentication with a guard in the app. >> But I dont like to see this popup requesting the username and password >> in the browser. I would prefer to use a normal webform, which will >> submit the login data using post to a non guarded resource. >> Is there a way to manipulate the header in that way, that the challenge >> header for the HTTPBasic authentication is set for the guarded >> resources? So I dont need to reenter the passord? >> >> Regards Stefan >> >> ------------------------------------------------------ >> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=23765 >> 37 >> >> ------------------------------------------------------ >> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2380873 >> >> > > ------------------------------------------------------ > http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2380880 > > ------------------------------------------------------ > http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2380886 > ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2380984

