Package com.google.appengine.api.users

Provides facilities to check if a user has authenticated, retrieve their email address, and check if they are an administrator for this application.

See: Description

Package com.google.appengine.api.users Description

Provides facilities to check if a user has authenticated, retrieve their email address, and check if they are an administrator for this application. It can also be used to construct a URL for users to login or logout.

As an example, your application might, in a JSP file, have code like this:

   <%
     UserService userService = UserServiceFactory.getUserService();
     if (!userService.isUserLoggedIn()) {
   %>
      Please <a href="<%=userService.createLoginURL("/newlogin.jsp")>">log in</a>>
   <% } else { %>
      Welcome, <%= userService.getCurrentUser().getNickname(); %>!
        (<a href="<%=userService.createLogoutURL("/")>">log out</a>>)
   <%
     }
   %>
 
See Also:
UserService, The Users Java API in the Google App Engine Developer's Guide.