Skip to content

Commit cd394bb

Browse files
vpavicrwinch
authored andcommitted
Align HttpSessionStrategy with WebSessionIdResolver
This commit simplifies `HttpSessionStrategy` API by aligning it with Spring Framework's `WebSessionIdResolver`. As a part of this, support for managing multiple users' sessions has been removed. Closes gh-275 Closes gh-362
1 parent 2ecb2e6 commit cd394bb

33 files changed

+176
-2635
lines changed

docs/src/docs/asciidoc/guides/java-users.adoc

Lines changed: 0 additions & 162 deletions
This file was deleted.

docs/src/docs/asciidoc/index.adoc

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ Spring Session provides an API and implementations for managing a user's session
1818
* <<httpsession,HttpSession>> - allows replacing the HttpSession in an application container (i.e. Tomcat) neutral way.
1919
Additional features include:
2020
** **Clustered Sessions** - Spring Session makes it trivial to support <<httpsession-redis,clustered sessions>> without being tied to an application container specific solution.
21-
** **Multiple Browser Sessions** - Spring Session supports <<httpsession-multi,managing multiple users' sessions>> in a single browser instance (i.e. multiple authenticated accounts similar to Google).
2221
** **RESTful APIs** - Spring Session allows providing session ids in headers to work with <<httpsession-rest,RESTful APIs>>
2322

2423
* <<websocket,WebSocket>> - provides the ability to keep the `HttpSession` alive when receiving WebSocket messages
@@ -98,10 +97,6 @@ If you are looking to get started with Spring Session, the best place to start i
9897
| Demonstrates how to use Spring Session in a REST application to support authenticating with a header.
9998
| link:guides/java-rest.html[REST Guide]
10099

101-
| {gh-samples-url}javaconfig/users[Multiple Users]
102-
| Demonstrates how to use Spring Session to manage multiple simultaneous browser sessions (i.e Google Accounts).
103-
| link:guides/java-users.html[Multiple Users Guide]
104-
105100
|===
106101

107102
.Sample Applications using Spring XML based configuration
@@ -144,7 +139,6 @@ This means that developers can switch the `HttpSession` implementation out with
144139
We have already mentioned that Spring Session provides transparent integration with `HttpSession`, but what benefits do we get out of this?
145140

146141
* **Clustered Sessions** - Spring Session makes it trivial to support <<httpsession-redis,clustered sessions>> without being tied to an application container specific solution.
147-
* **Multiple Browser Sessions** - Spring Session supports <<httpsession-multi,managing multiple users' sessions>> in a single browser instance (i.e. multiple authenticated accounts similar to Google).
148142
* **RESTful APIs** - Spring Session allows providing session ids in headers to work with <<httpsession-rest,RESTful APIs>>
149143

150144
[[httpsession-redis]]
@@ -284,17 +278,6 @@ public class SessionRepositoryFilter implements Filter {
284278
By passing in a custom `HttpServletRequest` implementation into the `FilterChain` we ensure that anything invoked after our `Filter` uses the custom `HttpSession` implementation.
285279
This highlights why it is important that Spring Session's `SessionRepositoryFilter` must be placed before anything that interacts with the `HttpSession`.
286280

287-
[[httpsession-multi]]
288-
=== Multiple HttpSessions in Single Browser
289-
290-
Spring Session has the ability to support multiple sessions in a single browser instance.
291-
This provides the ability to support authenticating with multiple users in the same browser instance (i.e. Google Accounts).
292-
293-
NOTE: The <<samples,Manage Multiple Users Guide>> provides a complete working example of managing multiple users in the same browser instance.
294-
You can follow the basic steps for integration below, but you are encouraged to follow along with the detailed Manage Multiple Users Guide when integrating with your own application.
295-
296-
include::guides/java-users.adoc[tags=how-does-it-work,leveloffset=+1]
297-
298281
[[httpsession-rest]]
299282
=== HttpSession & RESTful APIs
300283

samples/javaconfig/users/gradle/dependency-management.gradle

Lines changed: 0 additions & 5 deletions
This file was deleted.

samples/javaconfig/users/spring-session-sample-javaconfig-users.gradle

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)