Class LocalUserService

java.lang.Object
com.google.appengine.tools.development.AbstractLocalRpcService
com.google.appengine.api.users.dev.LocalUserService
All Implemented Interfaces:
LocalRpcService

@AutoService(LocalRpcService.class) public final class LocalUserService extends AbstractLocalRpcService
creates URLs that point to LocalLoginServlet and LocalLogoutServlet when used within the Development AppServer environment. There is a known discrepancy between this implementation and the production implementation. The production version will throw a ApiProxy.ApplicationException with applicationError set to UserServicePb.UserServiceError.ErrorCode.REDIRECT_URL_TOO_LONG when the url passed to createLoginURL(com.google.appengine.tools.development.LocalRpcService.Status, com.google.apphosting.api.UserServicePb.CreateLoginURLRequest) or createLogoutURL(com.google.appengine.tools.development.LocalRpcService.Status, com.google.apphosting.api.UserServicePb.CreateLogoutURLRequest) is too long. This implementation does not perform this check and therefore never returns this error.
  • Field Details

  • Constructor Details

    • LocalUserService

      public LocalUserService()
  • Method Details

    • createLoginURL

      public com.google.apphosting.api.UserServicePb.CreateLoginURLResponse createLoginURL(LocalRpcService.Status status, com.google.apphosting.api.UserServicePb.CreateLoginURLRequest request)
    • createLogoutURL

      public com.google.apphosting.api.UserServicePb.CreateLogoutURLResponse createLogoutURL(LocalRpcService.Status status, com.google.apphosting.api.UserServicePb.CreateLogoutURLRequest request)
    • getOAuthUser

      public com.google.apphosting.api.UserServicePb.GetOAuthUserResponse getOAuthUser(LocalRpcService.Status status, com.google.apphosting.api.UserServicePb.GetOAuthUserRequest request)
    • getPackage

      public String getPackage()
      Description copied from interface: LocalRpcService
      Returns the package for the service, for example, "datastore_v3".
      Returns:
      a not null package name.
    • init

      public void init(LocalServiceContext context, Map<String,String> properties)
      Description copied from interface: LocalRpcService
      Initializes the service with a set of configuration properties. Must be called before a service is started.
      Specified by:
      init in interface LocalRpcService
      Overrides:
      init in class AbstractLocalRpcService
      Parameters:
      context - A context object for the application
      properties - A read-only Map of properties.
    • start

      public void start()
      Description copied from interface: LocalRpcService
      Puts a new service into "serving" mode. Aside from setting properties, the service is not functional until after having been started.
      Specified by:
      start in interface LocalRpcService
      Overrides:
      start in class AbstractLocalRpcService
    • stop

      public void stop()
      Description copied from interface: LocalRpcService
      Stops the service, releasing all of its resources.
      Specified by:
      stop in interface LocalRpcService
      Overrides:
      stop in class AbstractLocalRpcService