我在python中有一个appspot应用程序。
需求
自定义登录屏幕在应用程序中,谷歌用户可以登录。设置适当的会话,这样即使用户试图打开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]我遗漏了什么吗?或者有没有其他的方法来做这件事?
发布于 2014-05-05 04:36:51
对于托管的google应用程序,您可以使用SAML (Google是SP,并且您的服务可以充当IDP) implementation。
https://stackoverflow.com/questions/23306993
复制相似问题