当单击 Google Apps 帐户中 Google 通用导航栏的“更多”部分中的 navLink 时,我没有直接登录到我的应用程序,而是显示了我的应用程序的登录页面。
我的应用市场清单:
<ApplicationManifest xmlns="http://schemas.google.com/ApplicationManifest/2009">
<Name>App Name</Name>
<Description>App Description</Description>
<!-- Administrators and users will be sent to this URL for application support -->
<Support>
<Link rel="support" href="http://myappid.appspot.com/help.html" />
</Support>
<!-- Show this link in Google's universal navigation for all users -->
<Extension id="navLink" type="link">
<Name>Myapp Navlink Name</Name>
<Url>http://myappid.appspot.com/ms.jsp?hd=${DOMAIN_NAME}</Url>
</Extension>
<!-- Declare our OpenID realm so our app is white listed -->
<Extension id="realm" type="openIdRealm">
<Url>http://myappid.appspot.com/</Url>
</Extension>
</ApplicationManifest>
我的 web.xml 相关部分:
<servlet>
<servlet-name>loginJsp</servlet-name>
<jsp-file>/login.jsp</jsp-file>
</servlet>
<servlet-mapping>
<servlet-name>loginJsp</servlet-name>
<url-pattern>/_ah/login_required</url-pattern>
</servlet-mapping>
<security-constraint>
<web-resource-collection>
<web-resource-name>ms</web-resource-name>
<url-pattern>/ms.jsp</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>*</role-name>
</auth-constraint>
</security-constraint>