Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ContinueRequestSessionInformationExpiredStrategy #14765

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Ilpyo-Yang
Copy link

Description

This PR adds a ContinueRequestSessionInformationExpiredStrategy to contiue next filters even though the session expired.

Changes

  • Add ContinueRequestSessionInformationExpiredStrategy
  • Add testcode

Issue #14077

@@ -0,0 +1,35 @@
/*
* Copyright 2002-2016 the original author or authors.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make sure that the copyright notice includes the current year?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I changed

* A {@link SessionInformationExpiredStrategy} continues to execute subsequent filters
* even after session expiration.
*
* @author Rosie Yang
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add @since 6.3 too

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I changed too. I realized I need to pay more attention to contribution rules, sorry about that.

/**
* Creates a new instance
* @param sessionInformation the SessionInformation that is expired
* @param request the HttpServletRequest
* @param response the HttpServletResponse
*/
public SessionInformationExpiredEvent(SessionInformation sessionInformation, HttpServletRequest request,
HttpServletResponse response) {
HttpServletResponse response, FilterChain filterChain) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of changing this constructor, a new constructor should be created accepting all those parameter + the FilterChain. The reason is because if we change this constructor it will be a breaking change for anyone that is using SessionInformationExpiredEvent.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As you mentioned, I add new constructor below original constructor. But filterChain value need for new constructor i had to handle this in original constructor too.

- continues to execute subsequent filters even after session expiration.
- Issue spring-projects#14077
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-triage An issue we've not yet triaged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants