tags:

views:

248

answers:

1
+1  Q: 

gwt ajax ssl login

i have GWT AJAX code but server side is PHP not JAVA. Now i need to login to server side PHP server. but i need to connect with SSL.

possiblity of solution i am thinking:

  1. change the http to https://
  2. PHP server side LAMP or XAMPP must have ssl support.

are they correct?

if there are some missing configuration then can anybody inform me?

+2  A: 

The main problem here is the Same Origin Policy - meaning you either have your whole page use https or not. In the latter case, you can write an external page that performs the login and then redirects the user to the actual web application (passing along some sort of token that the web application then sends to the server to check if it's valid). That's how GMail does it - notice that the login page is not part of the web application - you login via https (always), but you can choose to use the actual application via unencrypted connection.

One major disadvantage of using https on your whole site is that most browsers (some citation would be nice :)) don't cache https content - depending on your site, it might become a strain for your users (and your servers).

PS: The GWT documentation has some pointers regarding login implementation: one and two.
PPS: It doesn't really matter what your backend is - the problem lies on the browser/client side (Same Origin Policy).

Igor Klimer
+1, but the good news is, that browsers usually do cache HTTPS content (for Firefox, use Cache-Control: public), see http://stackoverflow.com/questions/174348/will-web-browsers-cache-content-over-https
Chris Lercher