java - Spring Security + Google App Engine + UserService : What is the correct way to logout?

标签 java spring google-app-engine spring-mvc spring-security

抱歉,如果这个问题很明显。

我对如何使用 Google App Engine (UserService) 和 Spring MVC/Spring Security 从 Web 应用程序注销感到非常困惑。

例如,有一种方法可以做到这一点,只需放置一个指向“j_spring_security_logout”的链接,如 mkyong 中所述。 .

还有基本Google App Engine tutorial中描述的方式, 放置指向“createLoginURL(...)”方法返回的 URL 的链接。

我都试过了,谷歌用户保持登录状态。

那么,完成这个简单任务的正确方法是什么?

谢谢。

最佳答案

  1. 通过指向 j_spring_security_logout,用户的当前 session 将失效,但他不会从 Google 帐户注销。因此,当用户返回到您希望用户登录的 URL 或链接时,使用 Google 帐户将起作用,因为他没有从 Google 注销。

  2. 当您将用户重定向到由 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/

相关文章:

java - 如何获取 Maven 插件的当前执行情况?

spring - Spring Cache Abstraction 和 Hibernate EHCache 哪个最好?

java - 实时产品评级的 GAE/J fragment 计数器计算

node.js - 如何恢复Nodejs GAE项目的源代码

google-app-engine - Google App Engine SSL 错误 "DNS records could not be found",即使自定义域正在运行

java - 表达式的类型必须是数组类型,但它解析为 long

java - Vaadin ComboBox 将文本字段宽度设置为 0(CSS 阴影 dom)

java - 仅使用默认库在 jython 中解码 json

java - 添加到请求 header ?

spring - FileSystemPersistentAcceptOnceFileListFilter 与 CompositeFileListFilter 不兼容