Google App Engine和Google Apps Marketplace [英] Google App Engine and the Google Apps Marketplace

查看:61
本文介绍了Google App Engine和Google Apps Marketplace的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是所有网页设计的新开发人员.

I am a new developer to all things web design.

我已经在Google App Engine上开发了一个应用程序,最近的一位客户希望将其发布在Google Apps Marketplace上.我只是将客户端添加为应用程序所有者,以使他能够发布应用程序.他在市场上发布了该应用,并收到了此电子邮件(缩写):

I have developed an application on Google App Engine and a recent client wanted to publish it on the Google Apps Marketplace. I simply added the client as an app owner to give him the ability to publish the app. He published the app on the marketplace and received this email (abbreviated):

"您最近提交的针对Google Apps Marketplace的应用程序,...,不符合针对Google App Marketplace的OAuth2要求.更具体地说,您似乎是通过appengine.google.com而不是在内部创建了您的应用程序Google Cloud Console, https://cloud.google.com/console .问题是应用程序引擎界面不允许您使用Google App Marketplace所需的OAuth2.请查看我们的文档,以获取有关OAuth2以及如何在您的应用程序中使用它的更多信息."

"Your recently submitted application for the Google Apps Marketplace, ..., did not meet the OAuth2 requirements for the Google App Marketplace. More specifically, it appears that you have built your application via appengine.google.com rather than within the Google Cloud Console, https://cloud.google.com/console. The issue is that the appengine interface doesn't allow you to utilize OAuth2 which is required for the Google App Marketplace. Check out our documentation for more information about OAuth2 and how to use it with your application."

我觉得这很令人困惑,因为我的appengine项目使用OAuth2作为除用户登录名之外的所有内容的服务帐户,我只是使用google.appengine.api给出的User对象来检查用户是否登录.了解您不能将Google App Engine与Google Apps Marketplace一起使用?还是这仅仅是不使用适当的登录方法的情况?

I find this very confusing because my appengine project uses OAuth2 as a service account for everything except the user login, where I simply use the User object given by google.appengine.api to check if the user is logged in. Am I to understand that you cannot use Google App Engine with the Google Apps Marketplace? Or is this simply a case of not using an appropriate login method?

推荐答案

这很愚蠢.当我开始与Google Apps Marketplace集成时,我也面临过这一问题.基本上,您需要做两件事:

This is very stupid. I've also faced that when I started integrated with Google Apps Marketplace. Basically you need to do 2 things:

  1. Federated Login用作应用程序的Authentication Type
  2. /_ah/login_required URI创建处理程序,该处理程序将自动登录
  1. Use Federated Login as Authentication Type of your application
  2. Create handler for /_ah/login_required URI which will sign in automatically

在第二点中,我已经使用 Gaelyk ,重新使用UserService非常简单:

I've used Gaelyk for the second point where it was pretty simple to reuse the UserService:

redirect users.createLoginURL(params['continue'], null, params.hd, [] as Set)

redirect users.createLoginURL(params['continue'], null, params.hd, [] as Set)

在普通的Java中,它可能会更冗长,但我希望您能理解.

In plain old Java it might be more verbose but I hope you get the picture.

这篇关于Google App Engine和Google Apps Marketplace的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆