在 Google App Engine 中验证 Google 帐户/在不同用户上下文下运行代码 - Java Servlet
我想做的是使用用户名和密码对 Google 帐户进行身份验证。
基本上,
[验证用户上下文 - 在 Java Servlet 内以语法方式登录 Google 帐户]
UserService userService = UserServiceFactory.getUserService();
User user = userService.getCurrentUser();
[Access Data Store based on Google Account]
[解析用户上下文]
请帮忙。我真的很感激。我们可以使用 UrlFetch ... 来执行此操作吗?我在Google SDK 1.6.1中尝试了remote-api,但存在一些问题,Google帮助中的代码不起作用。
java.io.IOException:无法从远程API获取appId;状态码 = 404 在 com.google.appengine.tools.remoteapi.RemoteApiInstaller.getAppIdFromServer(RemoteApiInstaller.java:313)
我尝试按照 http://code.google.com/appengine/docs/java/tools/remoteapi.html
I would like to do is to authenticate into Google Accounts using a Username and Password.
Basically,
[Authenticate User Context - Log in Pro grammatically into Google Accounts inside a Java Servlet]
UserService userService = UserServiceFactory.getUserService();
User user = userService.getCurrentUser();
[Access Data Store based on Google Account]
[Resolve the User Context]
Please help. I would really appreciate it. Can we perform this using UrlFetch ...? I tried remote-api in Google SDK 1.6.1 and there are some issues, the Code in Google Help does not work.
java.io.IOException: can't get appId from remote api; status code = 404
at com.google.appengine.tools.remoteapi.RemoteApiInstaller.getAppIdFromServer(RemoteApiInstaller.java:313)
I tried as per http://code.google.com/appengine/docs/java/tools/remoteapi.html
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能忘记将其包含
在 web.xml 中
You probably forgot to include
in your web.xml