Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
loginservice
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lanmw
loginservice
Commits
c51bc65a
Commit
c51bc65a
authored
Jun 17, 2026
by
linxu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(logout): improve REST logout success handler and update gitignore
parent
8e04c9f4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
.gitignore
.gitignore
+1
-0
RESTLogoutSuccessHandler.java
...java/com/keymobile/sso/conf/RESTLogoutSuccessHandler.java
+6
-0
No files found.
.gitignore
View file @
c51bc65a
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
.settings
.settings
.springBeans
.springBeans
.sts4-cache
.sts4-cache
.DS_Store
### IntelliJ IDEA ###
### IntelliJ IDEA ###
.idea
.idea
...
...
src/main/java/com/keymobile/sso/conf/RESTLogoutSuccessHandler.java
View file @
c51bc65a
package
com
.
keymobile
.
sso
.
conf
;
package
com
.
keymobile
.
sso
.
conf
;
import
com.keymobile.sso.logging.LogConstants
;
import
com.keymobile.sso.logging.LogManager
;
import
jakarta.servlet.ServletException
;
import
jakarta.servlet.ServletException
;
import
jakarta.servlet.http.HttpServletRequest
;
import
jakarta.servlet.http.HttpServletRequest
;
import
jakarta.servlet.http.HttpServletResponse
;
import
jakarta.servlet.http.HttpServletResponse
;
...
@@ -16,6 +18,10 @@ public class RESTLogoutSuccessHandler implements LogoutSuccessHandler {
...
@@ -16,6 +18,10 @@ public class RESTLogoutSuccessHandler implements LogoutSuccessHandler {
@Override
@Override
public
void
onLogoutSuccess
(
HttpServletRequest
request
,
HttpServletResponse
response
,
Authentication
authentication
)
throws
IOException
,
ServletException
{
public
void
onLogoutSuccess
(
HttpServletRequest
request
,
HttpServletResponse
response
,
Authentication
authentication
)
throws
IOException
,
ServletException
{
if
(
authentication
!=
null
&&
authentication
.
getName
()
!=
null
)
{
LogManager
.
logInfo
(
LogConstants
.
CTX_AUDIT
,
"User logged out: "
+
authentication
.
getName
());
}
request
.
getSession
().
invalidate
();
response
.
setStatus
(
HttpStatus
.
OK
.
value
());
response
.
setStatus
(
HttpStatus
.
OK
.
value
());
response
.
getWriter
().
flush
();
response
.
getWriter
().
flush
();
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment