GWT和认证 [英] GWT and Authentication

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

问题描述

什么是保护您的GWT + Tomcat应用程序执行身份验证和授权的最佳策略?

策略:


  1. 保护入口点;
  2. 保护远程服务。



确保入口点



最简单的方法是限制对html / js文件的访问由GWT使用常规Web应用程序安全工具生成:


  • Spring Security;
  • web.xml约束。


这可以让你有一个例如 AdminEntryPoint UserEntryPoint



确保远程服务



如果上述解决方案不够,可以深入挖掘。我在Spring Security中这样做了。我还没有找到将Spring Security与GWT集成的100%干净方式,所以我添加了一些胶水。简而言之:


What are the best strategies to secure your GWT + Tomcat app to perform authentication and authorization?

解决方案

Therea are two basic strategies:

  1. secure the entry points;
  2. secure the remote services.

Secure the entry points

The simplest way is to restrict access to the html/js files generated by GWT using regular web application security tools:

  • Spring Security;
  • web.xml constraints.

This can allow you to have an e.g. AdminEntryPoint and UserEntryPoint.

Secure the remote services

If the above solution is not enough, you can dig deeper. I have done so with Spring Security. I have not found a 100% clean way of integrating Spring Security with GWT, so I added a bit of glue. Briefly:

这篇关于GWT和认证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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