Spring 安全 login/logout - 运行 自定义代码
Spring secuirity login/logout - running custom code
我正在使用 spring 安全性,我想在用户登录或注销时添加一个非常简单的行为。我想要做的就是在服务器上记录这些信息。我在哪里可以这样做?
您需要的是登录和注销处理程序。 Spring太棒了,支持:-)
阅读 SavedRequestAwareAuthenticationSuccessHandler (and SimpleUrlAuthenticationFailureHandler)。你的答案就在那里。
至于注销处理程序 - this SO thread (and of course this article that I wrote a while back) 是你的答案。
我正在使用 spring 安全性,我想在用户登录或注销时添加一个非常简单的行为。我想要做的就是在服务器上记录这些信息。我在哪里可以这样做?
您需要的是登录和注销处理程序。 Spring太棒了,支持:-)
阅读 SavedRequestAwareAuthenticationSuccessHandler (and SimpleUrlAuthenticationFailureHandler)。你的答案就在那里。
至于注销处理程序 - this SO thread (and of course this article that I wrote a while back) 是你的答案。