Skip to content

Conversation

@ajgarlag
Copy link
Contributor

@ajgarlag ajgarlag commented Dec 2, 2014

Q A
Bug fix? yes
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #7845
License MIT
Doc PR

This PR allow you to control concurrent sessions. You can choose if you want to block new sessions or expire the oldest ones in order to limit the number of active sessions per user. To limit the access from expired sessions, this PR depends on the new firewall introduced in #12807.

To expire the oldest sessions, is necessary to access to the other sessions information from the current request, so a SessionRegistry is used to store this info. This service relies on a session storage service (SessionRegistryStorageInterface) to persist the info. Currently only a filesystem based implementation is provided; a Doctrine based one could be added to the Doctrine Bridge as I did in my previous #12009 PR.

As it occurs with the sessions, the information stored in the registry, should be periodically removed. Currently, I've implemented an event listener that will be called with the same probability that the native session garbage collector, but any better solution to sync garbage collection for native sessions and registry info is welcome.

Copy link
Member

Choose a reason for hiding this comment

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

This does only belong to your other pull request, doesn't it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, this PR includes the other PR first two changesets.

@fabpot
Copy link
Member

fabpot commented Jan 27, 2016

Closing this stale PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants