Does a domain's user list contain an ID? We can't provide this ID to you ahead of time.
I think for your use case, it's safe to use the email and handle the edge case of someone changing their email. -- Ikai Lan Developer Programs Engineer, Google App Engine Blogger: http://googleappengine.blogspot.com Reddit: http://www.reddit.com/r/appengine Twitter: http://twitter.com/app_engine On Wed, Dec 22, 2010 at 2:27 AM, l.denardo <[email protected]>wrote: > Hello, > I'm trying to figure out possible solutions for a problem. I'm > currently using openID to authenticate users, restricting to Google as > an identity provider (both gmail and Google Apps). > > What I need to do is to obtain reliable user information before a user > logs in to the application. Use case is simple: > *I want to make the app installable to a Google Apps domain (say for > the marketplace). > *During installation, domain admin logs in to my application, and I > retrieve domain's user list (tipically using Google Data java client > library) > *Domain admin configures roles for my application users (e.g. read > only or read/write access). > > Obviously, no other user in the domain has logged in. > When the user logs in for the first time, I will have to apply correct > roles and permissions, as provided during configuration. > > Best way to do this should be to access the unique userID provided by > UserService/User classes. According to documentation, this is the only > stable identifier for a given user. > So how is it possible to obtain it before the user logs in? > I tried to use User class constructor User(java.lang.String email, > java.lang.String authDomain), but this does not populate the ID. Is it > safe to save the object you obtain from such constructor, store it in > a temporary list, then compare it to the value returned by > userService.getCurrentUser() and apply roles accordingly? > > Thanks for any help on this > Regards > Lorenzo > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine for Java" group. > To post to this group, send email to > [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-appengine-java%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-appengine-java?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" 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-java?hl=en.
