diff --git a/shared_sdk_jetty12/src/main/java/com/google/apphosting/runtime/jetty/EE10AppEngineAuthentication.java b/shared_sdk_jetty12/src/main/java/com/google/apphosting/runtime/jetty/EE10AppEngineAuthentication.java index f502ba77..7e66d149 100644 --- a/shared_sdk_jetty12/src/main/java/com/google/apphosting/runtime/jetty/EE10AppEngineAuthentication.java +++ b/shared_sdk_jetty12/src/main/java/com/google/apphosting/runtime/jetty/EE10AppEngineAuthentication.java @@ -179,10 +179,6 @@ public AuthenticationState validateRequest(Request req, Response res, Callback c throw new ServerAuthException("validateRequest called with null response!!!"); } - if (AuthenticationState.Deferred.isDeferred(res)) { - return null; - } - try { UserService userService = UserServiceFactory.getUserService(); // If the user is authenticated already, just create a @@ -195,6 +191,10 @@ public AuthenticationState validateRequest(Request req, Response res, Callback c } } + if (AuthenticationState.Deferred.isDeferred(res)) { + return null; + } + try { logger.atFine().log( "Got %s but no one was logged in, redirecting.", request.getRequestURI());