If the user is signing in with your application for the first time, you will
need to follow the standard AuthSub flow to get a session token for the
user. Unfortunately, this may mean that the user has to sign in twice, once
to the App Engine application and once to the Contacts service -- this
prevents applications from accessing a user's contacts without their
explicit permission. This is consistent with every Google Data service.
Once you get the AuthSub one-use token, you can exchange it for a session
token and persist this in the datastore. Then, the next time the user comes
back to your application, you can fetch this token and use it without any
further authentication calls to the Contacts service.

- Jason

On Thu, Aug 27, 2009 at 10:10 PM, NMAGOCIO <[email protected]> wrote:

>
> How can I pass the auth from UserService to ContactsService?
>
> I got my App to pull data using the Profiles API but that was manually
> entering the profiles auth
>
> Something like this:
> String admin = request.getUserPrincipal().getName();
> ask for password...
> ContactsService myService = new ContactsService("Add Rich Content");
>            myService.setUserCredentials(admin, passWd, domain,
> "HOSTED");
>
> Yes token would be great but could not find
> request.getTokenOrSomething
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to