Password Confirmation Overlay
Posted
by Alasdair
on Stack Overflow
See other posts from Stack Overflow
or by Alasdair
Published on 2010-03-17T08:47:18Z
Indexed on
2010/03/17
8:51 UTC
Read the original article
Hit count: 335
jQuery
|jquery-ajax
Hello,
I'm creating a J2EE web application that uses jQuery and Ajax to help with some of the presentation for a user-friendly interface. I've done a lot of work ensuring security around persistant login cookies, and I've decided to request the password from any user that logged in using a persistant login cookie before being allowed to make any changes that could be malicious. This request would only happen once to confirm the user is who they say they are and will last throughout the session.
At present, any requests that meet this criteria has their request information stored in session and then the user is forwarded to a page to confirm their password. Once confirmed, the user's original request is then performed and the requestion information removed from session.
What I would like to do is avoid all this redirection and minimize what's held in session (even if it's just for a small time), thus improving usability and convenience for the user. I believe that a jQuery overlay could allow me to prompt the user for their password (if required) and then continue to submit the request if successful.
I would of originally used ThickBox, but since that's now deprecated I don't see the benefit in implementing it in an application at this development stage. However, I have tried to create an overlay using jQuery but I've scrapped every attempt as I can't seem to make it all come together. My main problem is preventing the submission when the user incorrectly types a password or cancels the overlay.
Desired Flow
Persistant Login > Sensitive Page > Submit > Password Confirmation Overlay > [Continue Submit | (Cancel | Incorrect]
I have already created JavaScript code to encrypt the password to be sent in a parameter, but all I need now is a method of controlling the overlay and how best to use Ajax for this purpose.
Please ignore the fact that this is a J2EE web application when answering as it is irrelevant really.
Thanks in advance,
Alasdair
© Stack Overflow or respective owner