Google App Engine Java - Federated Login what to store in the data warehouse

I am creating a Google App Engine application for Java using Federated login.

When a user logs into my application using the OAuth provider, I return a User object [http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/users/User.html].

I want to keep a link to this user in the data warehouse. However, what do I use as a unique key? Is it getFederatedIdentity () or getUserId ()? There is hardly any JavaDoc. Obviously, when the user subsequently logs in to my application, I want to get the object that I saved in the data warehouse.

I understand the federatedIdentity field, which, as I understand it, should always be filled out (I only allow federated logins). However, if this field is used to bind my data to a registered user, Google leaves this blank when testing on a local server ... so this will not be very useful.

What is the getUserId field - how did Google install it? Will it stay the same if the user id remains the same?

Thank you so much

+5
source share
2 answers

From Overview of the Java API for Users

, OpenID , . , , .

getUserId() - .

+2

: User . . .

0

All Articles