을, 사용되지 않습니다. 회신 구글은 특히 새로운 경험 여기 announcement
후, 모든 시장 애플 리케이션을위한 OAuth2를 사용을 권장하는 몇 가지 예제 코드를
def get(self, *args, **kwargs):
code = self.get_argument('code', None)
error = self.get_argument('error',None)
redirect_uri = "{protocol}://{host}{path}".format(protocol = self.request.protocol,
host = self.request.host,
path = self.request.path)
flow = OAuth2WebServerFlow(
client_id = config['CLIENT_ID'],
client_secret= config['CLIENT_SECRET'],
scope = 'https://www.googleapis.com/auth/userinfo.email',
redirect_uri = redirect_uri,
access_type = 'online'
)
if code is None:
auth_uri = flow.step1_get_authorize_url()
self.redirect(auth_uri)
elif error:
self.redirect("http://error.com")
else:
credentials = flow.step2_exchange(code)
http = httplib2.Http()
http = credentials.authorize(http)
service = build('oauth2', 'v2', http=http)
user = service.userinfo().get().execute()
감사합니다. 하지만 여기에서 볼 수있는 것처럼 https://developers.google.com/google-apps/marketplace/sso 마켓 플레이스 용 Apps에 OpenID를 사용하도록 Google에 강요합니다. – GiulianoBR
Google Apps Marketplace에 대한 새로운 경험을 발표했습니다 ([공지 사항] (http://googleenterprise.blogspot.com/2013/11/third-party-apps-now-easier-to-find-and. html)). 새로운 [개발자 설명서] (https://developers.google.com/apps-marketplace/)도 있습니다. OAuth2로 완전히 이전했습니다. – jonathanberi