抱歉,如果这个问题很明显。
我对如何使用 Google App Engine (UserService) 和 Spring MVC/Spring Security 从 Web 应用程序注销感到非常困惑。
例如,有一种方法可以做到这一点,只需放置一个指向“j_spring_security_logout”的链接,如 mkyong 中所述。 .
还有基本Google App Engine tutorial中描述的方式, 放置指向“createLoginURL(...)”方法返回的 URL 的链接。
我都试过了,谷歌用户保持登录状态。
那么,完成这个简单任务的正确方法是什么?
谢谢。
最佳答案
通过指向
j_spring_security_logout
,用户的当前 session 将失效,但他不会从 Google 帐户注销。因此,当用户返回到您希望用户登录的 URL 或链接时,使用 Google 帐户将起作用,因为他没有从 Google 注销。当您将用户重定向到由
userService.createLogoutUrl
创建的链接时,用户将从 Google 帐户注销。
根据您的要求,您可以使用单个或组合这两个步骤来从当前 session 和 Google 帐户中注销用户。
关于java - Spring Security + Google App Engine + UserService : What is the correct way to logout?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19418305/