简体   繁体   English

Google App Engine和Google Apps Marketplace

[英]Google App Engine and the Google Apps Marketplace

I am a new developer to all things web design. 我是所有网页设计的新开发人员。

I have developed an application on Google App Engine and a recent client wanted to publish it on the Google Apps Marketplace. 我已经在Google App Engine上开发了一个应用程序,最近的一位客户希望将其发布在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): 他在市场上发布了该应用程序,并收到此电子邮件(缩写):

"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." “您最近提交的有关Google Apps Marketplace的应用程序,...不符合Google App Marketplace的OAuth2要求。更具体地说,您似乎是通过appengine.google.com而不是在Google Cloud中构建的应用程序控制台https://cloud.google.com/console 。问题是appengine界面不允许您使用Google App Marketplace所需的OAuth2。请查看我们的文档以获取有关OAuth2以及如何进行操作的更多信息与您的应用程序一起使用。”

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? 我觉得这很令人困惑,因为我的appengine项目使用OAuth2作为除用户登录名以外的所有内容的服务帐户,在这里我只是使用google.appengine.api给出的User对象来检查用户是否登录。您不能在Google Apps Marketplace中使用Google App Engine? Or is this simply a case of not using an appropriate login method? 还是这仅仅是不使用适当的登录方法的情况?

This is very stupid. 这很愚蠢。 I've also faced that when I started integrated with Google Apps Marketplace. 当我开始与Google Apps Marketplace集成时,我也遇到过这种情况。 Basically you need to do 2 things: 基本上,您需要做两件事:

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

I've used Gaelyk for the second point where it was pretty simple to reuse the UserService : 我在第二点使用了Gaelyk ,在其中重复使用UserService非常简单:

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

In plain old Java it might be more verbose but I hope you get the picture. 在普通的旧Java中,它可能更冗长,但希望您能理解。

Adding federated login won't satisfy the requirements to be fully OAuth2. 添加联合登录将无法满足完全OAuth2的要求。 The User service will still use OpenID. 用户服务仍将使用OpenID。 You'll need to the Google Python Client Library to authenticate the user. 您需要使用Google Python Client Library来验证用户身份。 Here are some good samples: https://code.google.com/p/google-api-python-client/wiki/SampleApps#OAuth_2.0_Samples 以下是一些不错的示例: https : //code.google.com/p/google-api-python-client/wiki/SampleApps#OAuth_2.0_Samples

Currently we use Openid 2.0 for user authentication and Oauth for authorization of other services. 当前,我们使用Openid 2.0进行用户身份验证,并使用Oauth进行其他服务的授权。 Openid 2.0 is deprecated and Google will not provide authentication using Open Id. 不建议使用Openid 2.0,并且Google不会使用Open ID提供身份验证。 For time line refer this link https://developers.google.com/+/api/auth-migration#timetable 有关时间轴,请参阅此链接https://developers.google.com/+/api/auth-migration#timetable

So they are suggesting to use OpenidConnect for authentication of user. 因此,他们建议使用OpenidConnect进行用户身份验证。 OpenIdConnect is a layer written over Oauth 2.0 for authentication of user. OpenIdConnect是在Oauth 2.0之上编写的用于用户身份验证的层。

For references visit http://openid.net/connect/ and https://developers.google.com/accounts/docs/OAuth2Login?hl=ja#appsetup 有关参考,请访问http://openid.net/connect/https://developers.google.com/accounts/docs/OAuth2Login?hl=ja#appsetup

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM