Google Apps Marketplace - SSO for Google App Engine Java Application

I can’t enter my application when my NavLink in the "Advanced" section of the Google Universal Navigation Bar in your Google Apps account is clicked and the login page for my application is displayed.

My commercial application manifest:

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

My part related to 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>
+3
source share
3 answers

Follow this guide to configure a Java servlet that handles openID:

https://developers.google.com/google-apps/marketplace/tutorial_java

+1
source

Besides. You should add this to your application-manifest.xml:

<Edition id="free">
    <Name>Myapp Navlink Name</Name>
    <Extension ref="navLink" />
    <Extension ref="realm" />
</Edition>
0
source

Source: https://habr.com/ru/post/1780054/


All Articles