單擊Google Apps帳戶中Google通用導航欄的「更多」部分中的導航鏈接時,我不直接登錄到我的應用程序,而是單擊登錄頁面顯示我的應用程序。Google Apps Marketplace - 適用於Google App Engine的SSO Java應用程序
我Apps Marketplace中的清單:
<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>