Java filter for controlling concurrent sessions to a web application.
This has a similar function to Spring Security's concurrency control, but does not rely on Spring or assume the use of HTTP sessions.
- Include the
io.danpalmer101.csc.ConcurrentSessionFilterclass in your web application and apply to the relevant request paths. - Set the required
io.danpalmer101.csc.provider.SessionRepositoryProviderandio.danpalmer101.csc.provider.SessionStateProviderimplementations in the class either using dependency injection or by overriding theinitmethod of the filter- This module contains a default implementation which uses assumes a session is represented by a standard
HttpSessionand an identifier for the user is stored as an attribute of the session
- This module contains a default implementation which uses assumes a session is represented by a standard
Note that this library does not rely on any frameworks (such as Spring) so that it can be used in as many web application implementations as possible.