python - Google Apps 在 appspot 中定制了 google 登录页面

标签 python google-app-engine single-sign-on google-apps

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

要求:

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

到目前为止我尝试过的事情:

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]

有什么我想念的吗?还是有其他方法可以做到这一点?

最佳答案

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

关于python - Google Apps 在 appspot 中定制了 google 登录页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23306993/

相关文章:

Django Microsoft 身份验证后端在新部署中未成功

iphone - SSO 需要多次尝试登录

Python3 在同一行打印 - 7 段设备格式的数字

python - Pandas 数据框中的颜色单元格

python - 在 Pandas 中按 ID 有条件地删除行

python - URL 重写 - Google App Engine (Python)

google-app-engine - CSS 文件未在部署时更新(Google AppEngine)

python - 将整数列表形式的 python 字符串转换为适当的整数列表

google-app-engine - 向分区的 BigQuery 表添加数据和查询

single-sign-on - Databricks SSO 身份验证失败 |谷歌国内流离失所者