2010-11-30 37 views
2

我正在使用OpenID和GAE(實驗 - 聯合登錄)。我沒有 當我登出時提示輸入用戶名/密碼,然後再次登錄 。有人能讓我知道問題是什麼嗎?如何用max_auth_age = 0強制用戶使用PAPE擴展名重新輸入登錄密碼

我用下面的代碼來創建自己的登錄網址:只要您登錄

UserService userService = UserServiceFactory.getUserService(); 
User user = userService.getCurrentUser(); 
String logoutUrl = userService.createLogoutURL(destinationUrl, 
user.getAuthDomain()) 

回答

1

到您的谷歌帳戶,它不會:

UserService userService = UserServiceFactory.getUserService(); 
HashSet<String> attributeRequestSet = new HashSet<String>(); 
attributeRequestSet.add("openid.ns.pape=http://specs.openid.net/ 
extensions/pape/1.0"); 
attributeRequestSet.add("openid.pape.max_auth_age=0"); 
String loginUrl = userService.createLoginURL(destinationUrl, 
"gmail.com", "gmail.com", attributeRequestSet); 

和代碼爲我的退出網址的要求您輸入用戶名/密碼。

如果您註銷您的應用然後重新登錄,您將被重定向到Google身份驗證頁面,但由於您仍然登錄到Google,它會立即將您重定向回您的應用。

您請求(openid.pape.max_auth_age=0)的OpenID的功能尚不支持:看Unsupported Features

+0

那麼你是怎麼想我應該去讓我的行爲:誰已註銷我的應用程序的人都應該有通過傳遞登錄回用戶密碼。目前,我有一個解決方法 - 在某人點擊註銷後,我會顯示一個註銷成功的頁面,並且在該頁面上,我還要求用戶註銷Google帳戶。 – AmaltasCoder 2010-11-30 14:09:30

相關問題