gwt ajax ssl登录 [英] gwt ajax ssl login

查看:85
本文介绍了gwt ajax ssl登录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有GWT AJAX代码,但服务器端是PHP而不是JAVA。
现在我需要登录到服务器端的PHP服务器。
但我需要使用SSL连接。



解决方案的可能性我在想:


  1. 将http更改为https://

  2. PHP服务器端LAMP或XAMPP必须支持ssl。

是否正确?

如果有一些配置丢失,那么有人可以通知我吗?

这里的主要问题是同源策略 - 意味着你要么整个页面都使用https或不使用https。在后一种情况下,您可以编写一个执行登录的外部页面,然后将用户重定向到实际的Web应用程序(传递Web应用程序随后发送给服务器以检查它是否有效的某种令牌)。这就是GMail如何做的 - 注意登录页面不是Web应用程序的一部分 - 通过https(总是)登录,但您可以选择通过未加密的连接使用实际的应用程序。



在整个网站上使用https的一个主要缺点是大多数浏览器(有些引用会很好:))不会缓存https内容 - 根据您的网站,它可能会对用户造成压力(并且PS:GWT文档有关于登录实现的一些指示:

web-toolkit-incubator / wiki / LoginSecurityFAQrel =noreferrer> one 2
PPS:后端是什么并不重要 - 问题在于浏览器/客户端(同源策略)。


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?

解决方案

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).

这篇关于gwt ajax ssl登录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆