Re: [appengine-java] Do I still need to use session if I use google user account to authenticate?

2010-02-28 Thread Chau Huynh
"Perhaps you'd better use your own userssion with one pojo class"
I don't think you would sacrifice User service (and its scalability) to deal
with the concern opok posted below.

Hi opok,
"I notice that the user service does not need HttpServletRequest to get the
current context, is that reliable?"
Your app might running on multiple VM's, so using Google service is more
reliable than your own implementation, I guess.
I think you might want to check docs on Google account (
http://code.google.com/appengine/docs/java/users/) and also on how to use
session provided by App Engine (
http://code.google.com/appengine/docs/java/config/appconfig.html#Enabling_Sessions
)
My thought is, your user logged on to your GAE app already, they would need
to log out of your app first, in order to log on that app with another ID,
using the same browser.
In this thread, Ikai (Google) explained what was shared when you're using
the service (
https://groups.google.com/group/google-appengine-java/browse_thread/thread/816f81da16ca4ce8/844655a8f604d980?lnk=raot
)
and guidance on how to retain form data (
http://groups.google.com/group/google-appengine-java/browse_thread/thread/7b752a5dfabd4bd0/ed596f644d23a656?lnk=raot
)
You just need to google the group...

On Mon, Mar 1, 2010 at 9:20 AM, yjun hu  wrote:

> Perhaps you'd better use your own userssion with one pojo class
>
> On Mon, Mar 1, 2010 at 9:49 AM, opok  wrote:
>
>> I currently use Google Account to authenticate and get the current
>> user like this:
>>
>> UserService userAction = UserServiceFactory.getUserService();
>> User user = userAction.getCurrentUser();
>>
>> I notice that the user service does not need HttpServletRequest to get
>> the current context, is that reliable?
>>
>> What about my customer use another google id to login in another page
>> of my app? Would the current user change when the customer returned to
>> the first page to make some other requests ?
>>
>> In the past, I always use Session to storage user information to id
>> current user, it looks like Google's user service can provide the same
>> functionality, so I can abandon the session for that kind of usage, is
>> that correct?
>>
>> --
>> 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
>> google-appengine-j...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-appengine-java+unsubscr...@googlegroups.com
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/google-appengine-java?hl=en.
>>
>>
>
>
> --
> dream or truth
>
> --
> 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
> google-appengine-j...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com
> .
> 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 google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] Do I still need to use session if I use google user account to authenticate?

2010-02-28 Thread yjun hu
Perhaps you'd better use your own userssion with one pojo class

On Mon, Mar 1, 2010 at 9:49 AM, opok  wrote:

> I currently use Google Account to authenticate and get the current
> user like this:
>
> UserService userAction = UserServiceFactory.getUserService();
> User user = userAction.getCurrentUser();
>
> I notice that the user service does not need HttpServletRequest to get
> the current context, is that reliable?
>
> What about my customer use another google id to login in another page
> of my app? Would the current user change when the customer returned to
> the first page to make some other requests ?
>
> In the past, I always use Session to storage user information to id
> current user, it looks like Google's user service can provide the same
> functionality, so I can abandon the session for that kind of usage, is
> that correct?
>
> --
> 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
> google-appengine-j...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>
>


-- 
dream or truth

-- 
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 google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Do I still need to use session if I use google user account to authenticate?

2010-02-28 Thread opok
I currently use Google Account to authenticate and get the current
user like this:

UserService userAction = UserServiceFactory.getUserService();
User user = userAction.getCurrentUser();

I notice that the user service does not need HttpServletRequest to get
the current context, is that reliable?

What about my customer use another google id to login in another page
of my app? Would the current user change when the customer returned to
the first page to make some other requests ?

In the past, I always use Session to storage user information to id
current user, it looks like Google's user service can provide the same
functionality, so I can abandon the session for that kind of usage, is
that correct?

-- 
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 google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.