title: get current user with java in Google apps Marketplace
body: <p>I'm developing an App for the Google Apps Marketplace with Java and Appengine.</p>
  
  <p>I need to know if the user that is making the request to my app is logged-in with a Google account.
  And if is the case and the user is logged in, run the app using OAuth2 with "Service Account" to make the api calls.
  One solution that occurred to me is to use:</p>
  
  <pre><code> &lt;security-constraint&gt;
      &lt;web-resource-collection&gt;
        &lt;web-resource-name&gt;any&lt;/web-resource-name&gt;
        &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
      &lt;/web-resource-collection&gt;
      &lt;auth-constraint&gt;
        &lt;role-name&gt;*&lt;/role-name&gt;
      &lt;/auth-constraint&gt;
    &lt;/security-constraint&gt;  
  </code></pre>
  
  <p>In the "web.xml" file.</p>
  
  <p>However, the Google Apps Marketplace managers have told me that I can not use this system.
    Nor I can use OAuth2 flow (Client ID for web application), because the user don't need to accept the scopes if the admin has been accepted this scopes previously.</p>
  
  <p>What alternative would you use?
    Why I can not use the ""?</p>
  
  <p>Thanks in advance and regards.</p>