2014-04-26 2 views
3

나는 python으로 appspot 응용 프로그램을 보유하고 있습니다.Google Apps 맞춤형 Google 로그인 페이지 (appspot)

요구 사항 : 응용 프로그램에서

사용자 로그인 화면 위치를 Google 사용자의 로그인이 가능합니다. 사용자가 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] 

내가 놓친 게 있나요? 또는 이것을하기위한 다른 접근법이 있습니까?

호스팅 구글 애플리케이션의 경우
+5

SAML을 사용할 수 있습니다. –

+1

답변 해 주셔서 감사합니다. 당신은 확실합니까? .. 이와 같은 종류의 일을하는 시장에서 gLogin 및 CloudPages와 같은 일부 앱을 발견했습니다. –

+0

Google 계정을 사용하는 경우 사용자는 항상 Google 로그인 페이지를 통해 로그인합니다. 나는 결코 당신이 할 수없는 상황을 보지 못했습니다. –

답변

0

, 당신은 당신이 디자인하여이 작업을 수행 할 수 없습니다 (구글이 SP, 그리고 서비스가 IDP 역할을 할 수 있습니다) https://developers.google.com/google-apps/sso/saml_reference_implementation

+0

예. 감사. 나는 이미 이것을 알고있다. 그러나 나는 그 접근법을 사용하고 싶지 않다. –

+0

어딘가에 (나쁜) 사용자 자격 증명을 캐싱하지 않으면이 옵션이 유일한 옵션이라고 생각할 가치가 있습니다. – capybaras

+0

모든 코드 샘플 또는 이에 대한 구체적인 지침? –

관련 문제