Skip to content

Commit

Permalink
Add ContinueRequestSessionInformationExpiredStrategy
Browse files Browse the repository at this point in the history
- continues to execute subsequent filters even after session expiration.
- Issue #14077
  • Loading branch information
Ilpyo-Yang committed Apr 14, 2024
1 parent bdc8571 commit 4d4f77e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -24,6 +24,7 @@
* even after session expiration.
*
* @author Rosie Yang
* @since 6.3
*/
public final class ContinueRequestSessionInformationExpiredStrategy implements SessionInformationExpiredStrategy {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -28,6 +28,7 @@
* An event for when a {@link SessionInformation} is expired.
*
* @author Rob Winch
* @author Rosie Yang
* @since 4.2
*/
public final class SessionInformationExpiredEvent extends ApplicationEvent {
Expand All @@ -44,6 +45,16 @@ public final class SessionInformationExpiredEvent extends ApplicationEvent {
* @param request the HttpServletRequest
* @param response the HttpServletResponse
*/
public SessionInformationExpiredEvent(SessionInformation sessionInformation, HttpServletRequest request,
HttpServletResponse response) {
super(sessionInformation);
Assert.notNull(request, "request cannot be null");
Assert.notNull(response, "response cannot be null");
this.request = request;
this.response = response;
this.filterChain = null;
}

public SessionInformationExpiredEvent(SessionInformation sessionInformation, HttpServletRequest request,
HttpServletResponse response, FilterChain filterChain) {
super(sessionInformation);
Expand Down

0 comments on commit 4d4f77e

Please sign in to comment.