OAuth: Check for session validity during logout

GitHub-Bug: https://github.com/davido/gerrit-oauth-provider/issues/9
Change-Id: Id25792cdf6e28ba8d0f97bcc41d8c6409558314e
This commit is contained in:
David Ostrovsky
2015-04-25 12:31:57 +02:00
parent e0ad57751b
commit 8573bed76a

View File

@@ -52,6 +52,8 @@ class OAuthLogoutServlet extends HttpLogoutServlet {
protected void doLogout(HttpServletRequest req, HttpServletResponse rsp)
throws IOException {
super.doLogout(req, rsp);
oauthSession.get().logout();
if (req.getSession(false) != null) {
oauthSession.get().logout();
}
}
}