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.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.google.appengine.tools.development.LocalRpcService
LocalRpcService.Status -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateLoginURL(LocalRpcService.Status status, UserServicePb.CreateLoginURLRequest request) createLogoutURL(LocalRpcService.Status status, UserServicePb.CreateLogoutURLRequest request) getOAuthUser(LocalRpcService.Status status, UserServicePb.GetOAuthUserRequest request) Returns the package for the service, for example, "datastore_v3".voidinit(LocalServiceContext context, Map<String, String> properties) Initializes the service with a set of configuration properties.voidstart()Puts a new service into "serving" mode.voidstop()Stops the service, releasing all of its resources.Methods inherited from class com.google.appengine.tools.development.AbstractLocalRpcService
getDefaultDeadline, getMaxApiRequestSize, getMaximumDeadline
-
Field Details
-
OAUTH_CONSUMER_KEY_PROPERTY
- See Also:
-
OAUTH_EMAIL_PROPERTY
- See Also:
-
OAUTH_USER_ID_PROPERTY
- See Also:
-
OAUTH_AUTH_DOMAIN_PROPERTY
- See Also:
-
OAUTH_IS_ADMIN_PROPERTY
- See Also:
-
PACKAGE
The package name for this service.- See Also:
-
-
Constructor Details
-
LocalUserService
public LocalUserService()
-
-
Method Details
-
createLoginURL
public UserServicePb.CreateLoginURLResponse createLoginURL(LocalRpcService.Status status, UserServicePb.CreateLoginURLRequest request) -
createLogoutURL
public UserServicePb.CreateLogoutURLResponse createLogoutURL(LocalRpcService.Status status, UserServicePb.CreateLogoutURLRequest request) -
getOAuthUser
public UserServicePb.GetOAuthUserResponse getOAuthUser(LocalRpcService.Status status, UserServicePb.GetOAuthUserRequest request) -
getPackage
Description copied from interface:LocalRpcServiceReturns the package for the service, for example, "datastore_v3".- Returns:
- a not
nullpackage name.
-
init
Description copied from interface:LocalRpcServiceInitializes the service with a set of configuration properties. Must be called before a service isstarted.- Specified by:
initin interfaceLocalRpcService- Overrides:
initin classAbstractLocalRpcService- Parameters:
context- A context object for the applicationproperties- A read-onlyMapof properties.
-
start
public void start()Description copied from interface:LocalRpcServicePuts a new service into "serving" mode. Aside from setting properties, the service is not functional until after having been started.- Specified by:
startin interfaceLocalRpcService- Overrides:
startin classAbstractLocalRpcService
-
stop
public void stop()Description copied from interface:LocalRpcServiceStops the service, releasing all of its resources.- Specified by:
stopin interfaceLocalRpcService- Overrides:
stopin classAbstractLocalRpcService
-