Google Apps在appspot中定制了Google登录页面 [英] Google Apps customized google login page in appspot

查看:93
本文介绍了Google Apps在appspot中定制了Google登录页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在python中有一个appspot应用程序。

要求

Google用户可登录的应用程序中的自定义登录屏幕。设置适当的会话,以便即使用户尝试打开Goog​​le Mail或任何经过身份验证的Google网站,也应直接打开,而不用询问用户名和密码。
我不想将它们重定向到Google登录页面。



到目前为止我尝试过的东西:

 第一种方法
1)使用ClientLogin,在py
中验证用户名和密码 - 获取认证令牌
- 使用认证令牌检索Cookies
- 重定向到受保护的appspot url通过设置Cookies。

现在这应该带我到appspot应用程序的安全网址。但它显示了Google登录页面。
源代码:[http://pastebin.com/wfZ8eDGM][1] [http://stackoverflow.com/questions/101742/how-do-you-access-an-authenticated-google-app-引擎服务从非web-py] [2]
第二种方法
1)从Google登录页面简单地复制HTML源代码并将其粘贴到login.html中,如此处所述http: //stackoverflow.com/questions/13815084/custom-google-apps-login-page/13815342#13815342
2)点击登录按钮后,显示哎呀!您的浏览器似乎禁用了Cookie。已启用或尝试打开新的浏览器窗口。但是在浏览器中启用cookie。
源代码:[http://pastebin.com/N7thPc3u] [3]

有什么我失踪?或者是否有任何其他方法可以做到这一点?为解决方案

对于托管谷歌应用程序,您可以使用SAML(Google是SP,并且您的服务可以充当IDP)
https://developers.google。 com / google-apps / sso / saml_reference_implementation


I have an appspot application in python.

Requirement:

Custom login screen in application where Google users can Signin. Setting up appropriate sessions so that even if user tries to open Google Mail or any authenticated Google site it should open directly without asking username and password. I dont want to redirect them to Google login page.

Things that I've tried so far :

1st Approach
    1) Using ClientLogin, validate username and password in py
        - Get Auth token
        - Using Auth token retrieve Cookies
        - Redirect to secured appspot url by setting up the Cookies. 

    Now this should ideally take me to the secured url of appspot application. But its showing the Google Login page. 
    Source code : [http://pastebin.com/wfZ8eDGM][1] [http://stackoverflow.com/questions/101742/how-do-you-access-an-authenticated-google-app-engine-service-from-a-non-web-py][2]
2nd Approach
    1) Plainly copied the html source from Google Login page and paste it in login.html as described here http://stackoverflow.com/questions/13815084/custom-google-apps-login-page/13815342#13815342
    2) Upon clicking login button, its showing "Oops! Your browser seems to have cookies disabled. Make sure cookies are enabled or try opening a new browser window. ". But cookies are enabled in broswer.
    Source code: [http://pastebin.com/N7thPc3u][3]

Is there anything that I am missing ? or Is there any other approach for doing this ?

解决方案

For hosted google applications, you could use SAML (Google is the SP, and your service can act as the IDP) https://developers.google.com/google-apps/sso/saml_reference_implementation

这篇关于Google Apps在appspot中定制了Google登录页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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