Skip to main content

Login Scheme

1 reply [Last post]
Joined: 2008-06-04
Points: 0


Currently I have a login page, that sends username/password over ajax, authenticates, and on successfuly authentication reloads the page from client side, if the ajax request is successul.

I also made my ajaxy login page working with https.

What are the common schemes for making a login page? I noticed some sites like gmail submits a post, then displays a progress bar, or some sort of `please wait message` then redirects...

Basically I dont like my ajaxified login page, and want to make a more classical login page.

Best Regards,

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2010-02-24
Points: 0

Hey Cam,

I've been playing with login/registration panels as a way of catching up on the basics of JSF 2.0. I have a prototype of an application written in PHP, but it needs really needs to be rewritten in Java because of various issues. Since I was using the PHP "tank-auth" user authentication system, I thought I might as well port it to Java (or at least use it as a rough guideline away). It tries to cover all the bases -- registration, login, captcha, email registration and notification, and so on.

I have settled for a mixture of standard JSF 2.0 component pages inside a template, using the JQuery validation plugin for all the client-side validation (which was ridiculously easy to do) and then just using the standard h:commandButton submits to the server to validate the userid and password etc (using JPA). It's nothing clever, but it seems to be working fine now that I am getting the hang of JSF 2.0. a little.

I agree that there isn't really a major need for Ajax on a login panel. If you are going to turn your web application into a client-side application, then you would probably be better off using Google GWT anyway.

The user interface you should use depends on how long the users have to wait before they see the next screen. If it's only a couple of seconds, then the basic approach is fine, but if it's much longer than that (Google Mail is downloading a whole application when loading up so it can take a while) then you should provide some feedback to prevent your user from worrying that there is something wrong and clicking refresh. I would think that PrimeFaces or RichFaces or some other component library would provide some sort of progress bar you need without having to roll your own.

One place I see Ajax used a lot is when your checking a new username at registration time to see if it has already been taken. I am just working on the registration form at the moment, so I might have a go with Ajaxifying that field, mostly to learn how to do it.