Thanks for your reply Ikai,
I understand what you're saying - my question is that i'm trying to
allow a user who is logged into their google doc speadsheet and use
=ImportData("http://app.myapp.com/Service/value") in a cell to pull
in data from an app engine service. This works just fine - i was
hoping that
since the user logged into the app engine app and then logged into the
google doc that the authentication cookie they got for that session
would somehow get passed along in the header of data request. It
seems like, having logged into both places, the browser session stays
authenticated to both places, but the importdata request doesn't
provide the header.
It makes sense that this dosn't work - but just in case there is a way
to do this - here is the scenario. Say http://app.myapp.com/Service/value
is a rest service that calls a function that returns true or false if
the user is logged in
1. user logs into the app engine app.myapp.com
2. user navigates to their google docs and logs into that.
3. user navigates to http://app.myapp.com/Service/value - returns true
4. user navigates back to spreadsheet and puts this value in a cell
ImportData("http://app.myapp.com/Service/value")
5. returns false.
just seems like the authentication cookie isn't available from the doc
On Dec 10, 8:02 pm, "Ikai L (Google)" <[email protected]> wrote:
> Benjamin,
>
> If I understand you correctly, what you are seeing is that a user that logs
> into your application will have to log in again for Google Docs. This sounds
> like expected behavior. A user may wish to log in to an application without
> logging into their docs account. Logging into an App Engine application with
> a Google login does not log a user into any Google services automatically.
>
>
>
>
>
> On Wed, Dec 9, 2009 at 2:02 PM, Benjamin <[email protected]> wrote:
> > I'm struggling with behavior with authentication. A user logs into my
> > app engine app through normal means and from that point on
>
> > public static User getUser() {
> > com.google.appengine.api.users.UserService u =
> > UserServiceFactory.getUserService();
> > return u.getCurrentUser();
> > }
>
> > returns a valid user object. If the user opens a new browser window
> > and types in the url of a service on my app they get data back and the
> > above function keeps returning the user. If they open a google doc
> > associated with their user id, and paste that url in a importweb
> > function, the app returns a not logged in exception.
>
> > the way i see it, they are logged in to the point where they can work
> > with the app engine app and open their google docs, why would the user
> > service call return "not logged in" when responding to a http request
> > from a google doc spreadhsheet.
>
> > So you're logged in and can run the app, open your google docs, past
> > this url in a browser and get XML
>
> >http://app.myapp.com/Service/value
>
> > but in a google doc, the same url returns not logged in...
>
> > =ImportData("http://app.myapp.com/Service/value")
>
> > --
>
> > 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]<google-appengine%2Bunsubscrib
> > [email protected]>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-appengine?hl=en.
>
> --
> Ikai Lan
> Developer Programs Engineer, Google App Engine
--
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.