2009/10/27 mscwd01 <[email protected]> > > I am creating an app which requires user authentication so that each > person can login to their own "private" area. The default Users > service should suit my needs; however I have a quick question to > ensure I have understood how it works correctly. > > To check whether someone is logged in you do the following: > User user = userService.getCurrentUser(); > > If the user object is null - the user is not logged in > If it is not null, the user has been logged in. >
Yep sounds correct. > > To get the unique identity of the user you use: > user.getNickname() > No, this is not a unique identifier as I remember, this is a user changeable human friendly name associated with their account. To key things in your datastore with a specific user you may want to look at the: user.user_id() method that will return a constant unique string for each user, even if they change their email address. > > Now, is it okay to just use this identifier to fetch the stored data > for this user or is there another way? > Using the user_id should be fine. > > Second question, is their another "off the shelf" method to > authenticate users without using the App Engine users service - > something which I could implement into my site design and not have to > redirect to the Google Accounts login page? > I'm not too sure on the best alternatives, although there is a Django users module that some people have been using, and of course there is always alternatives like OpenID. However you could maintain your own sessions and write your own authentication (although it seems pointless :) ). > Many thanks! > > > Hope that helped, Good Luck! Will. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---
