简体   繁体   English

Google Apps在appspot中自定义了Google登录页面

[英]Google Apps customized google login page in appspot

I have an appspot application in python. 我在python中有一个appspot应用程序。

Requirement : 要求

Custom login screen in application where Google users can Signin. 应用程序中的自定义登录屏幕,Google用户可以登录。 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. 设置适当的会话,以便即使用户尝试打开Goog​​le Mail或任何经过身份验证的Google网站,也应该直接打开,而无需询问用户名和密码。 I dont want to redirect them to Google login page. 我不想将它们重定向到Google登录页面。

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 ? 或者还有其他办法吗?

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

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

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