【问题标题】:GAE + GWT Servlet without authenticationGAE + GWT Servlet 无需认证
【发布时间】:2012-06-28 07:28:33
【问题描述】:

我正在使用 Google App Engine 和 GWT 开发一个网络应用程序。 我将提供的身份验证用于 Google 帐户,因此我的 web.xml 包含以下几行:

<security-constraint>
    <web-resource-collection>
        <url-pattern>/*</url-pattern>
    </web-resource-collection>
    <auth-constraint>
        <role-name>*</role-name>
    </auth-constraint>
</security-constraint>

我需要一个不受 Google 身份验证的特定 servlet,因为它将被 Android 设备调用。请不要建议对设备进行身份验证的方法,因为它不适合我的需要。

如何设置我的项目,以使所有内容都通过身份验证得到保护,而只有一个 servlet 不受保护?

【问题讨论】:

    标签: java google-app-engine gwt authentication


    【解决方案1】:

    你为什么不能:

    1)修改约束的url

    <security-constraint>
        <web-resource-collection>
            <url-pattern>/protected/*</url-pattern>
        </web-resource-collection>
        <auth-constraint>
            <role-name>*</role-name>
        </auth-constraint>
    </security-constraint>
    

    2) 将所有内容移入 /protected

    3) 将 android 的东西放在其他地方……在 / 或新文件夹 /android

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-03-02
      • 2011-01-17
      • 2014-09-15
      • 2011-11-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多