Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)



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 .