If I recall correctly I read a description of a QR-Code login in which the page is "constantly" (periodically most likely) polling the server to see if the user has been authenticated.
I.e.: You probably need two resources (or one with parameters): One to authenticate and one to ask if the user has been authenticated. In addition to what you currently have for authenticating with the QR code, you add some javascript code that periodically polls the later resource and if the answer is "yes" then it redirects to the home page. Perhaps you can do the latter with an ajax timer behavior, I'm not sure though if that may interfere with the user typing in the username/password controls. On Wed, Jan 7, 2015 at 3:49 PM, q_159 <[email protected]> wrote: > Hi, > > I got my first problem where my colleagues can't help me anymore. > Because I'm fairly new to Wicket, I don't know how to describe it properly, > so here's the complete story: > > We have a login form inside a Wicket Panel, which shows up as a dialog. > When > the form is sent, the "onSubmit" method is called correctly and the user > gets authenticated. That works fine. > > Now in my task I have to find an alternative method to login. > I want to try a QR-Code and a related app for my Android Phone. The phone > scans the code, solves the integrated challenge and sends it back to the > panel. > > What I have done so far: > 1) the login panel shows the QR-Code, which contains the Wicket-sessionID > and a challenge > 2) a smartphone app scans the code and solves the challenge > 3) on Wicket side, I implemented a stateless WebResource, which will be > contacted by the app to push the response > 4) the resource has references to all open Wicket-Sessions, so I can get > the > correct session via ID from 1) > 5) the resource hands the response to the login panel > 5) the panel proofs the response > > Maybe you already guessed my problem: > When I login normally, the "onSubmit"-method delivers the > AjaxRequestTarget, > which I need to close the dialog > (/target.appendJavaScript("$.deMailLayer.close();")/) > With the QR-Code-login, I'm now somewhere in my panel, but I don't have > this > target. I can't get it with > "/RequestCycle.get().find(AjaxRequestTarget.class)/" either because there > is > no Request from the browser :-( > > How can I login my user (and force the browser to refresh if this is > necessary)? > > If it helps: I'm using Wicket 6 and our session class extends > /AbstractAuthenticatedWebSession/ > > - Seb > > PS: I answered to the mailing list registration, but got an error back, so > I > don't know if it worked or not. > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/How-to-solve-this-login-problem-tp4668931.html > Sent from the Users forum mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
