views:

110

answers:

0

Hi there:

I am using Google account as authentication of my application. I am trying to use a RPC call to retrieve the user information using com.google.appengine.api.users.UserServiceFactory. So far I have something like:

@SuppressWarnings("serial") 
public class MyAppImpl extends  RemoteServiceServlet  implements 
MyAppService   { 
  public SvUser getUser() { 
          User userG = UserServiceFactory.getUserService().getCurrentUser(); 
         if (userG == null){ 
                return null; 
         }else{ 
                 return new SvUser(userG.getUserId(), userG.getNickname(), userG.getEmail()); 
          } 
     } 
} 

where SvUser is a serializable DTO. The RPC is working properly, however I can only get a null as return value, which indicates that I cannot retrieve anything from Google. Is there something I am missing in the code? Or it's not working under development mode?

Thanks!