@@ -0,0 +1,1730 @@
+/*%0A * Copyright (c) 2011 Google Inc.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22); you may not use this file except%0A * in compliance with the License. You may obtain a copy of the License at%0A *%0A * http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software distributed under the License%0A * is distributed on an %22AS IS%22 BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express%0A * or implied. See the License for the specific language governing permissions and limitations under%0A * the License.%0A */%0A%0Apackage com.google.api.client.extensions.appengine.auth;%0A%0Aimport com.google.api.client.extensions.appengine.http.urlfetch.UrlFetchTransport;%0Aimport com.google.api.client.extensions.servlet.auth.AbstractTwoLeggedFlowServlet;%0Aimport com.google.api.client.http.HttpTransport;%0Aimport com.google.api.client.json.JsonFactory;%0Aimport com.google.api.client.json.jackson.JacksonFactory;%0A%0A/**%0A * Specialization of the two-legged flow that uses some simple defaults for App Engine.%0A *%0A * @author moshenko@google.com (Jacob Moshenko)%0A * @since 1.5%0A */%0Apublic abstract class AbstractAppEngineTwoLeggedFlowServlet extends AbstractTwoLeggedFlowServlet %7B%0A%0A  private static final long serialVersionUID = 1L;%0A%0A  /**%0A   * Return the user ID of the user that is logged in.%0A   *%0A   * @throws IllegalStateException Thrown when no user is logged in.%0A   */%0A  @Override%0A  protected String getUserId() %7B%0A    return AppEngineServletUtils.getUserId();%0A  %7D%0A%0A  @Override%0A  protected HttpTransport newHttpTransportInstance() %7B%0A    return new UrlFetchTransport();%0A  %7D%0A%0A  @Override%0A  protected JsonFactory newJsonFactoryInstance() %7B%0A    return new JacksonFactory();%0A  %7D%0A%0A%7D%0A

Add AbstractAppEngineTwoLeggedFlow. http://codereview.appspot.com/4667073/