undertow-io/undertow — pull request #155 by pferraro (2014-01-09 21:59:43+00:00)
Title: Enhance SingleSignOnAuthenticationMechanism implementation to further simplify clustering integration.

* Extract SingleSignOnManager interface - make AbstractSingleSignOnAuthenticationMechanism concrete
* Add InMemory implementation of SingleSignOnManager, based on previous SingleSignOnAuthenticationMechanism implementation.
* Make SingleSignOnEntry an interface, move implementation to InMemorySingleSignOnManager
* Move SingleSignOn identifier generation responsibility to SSO manager, clustered SSO will want to override this
* Add SessionManager.getDeploymentName() to uniquely identify session manager, add hashCode(), equals(...) methods
* Now that SessionManager is hashable, map sessions by session manager instead of session id - session ids are not necessarily unique across deployments.
- Fetching sessions via session manager (instead of deployment name) simplifies the clustering code, which will need to lookup the Session from the SessionManager via its session id

Other SingleSignOnAuthenticationMechanism fixes:
* SSO id session attribute is accessed during sessionDestroyed listener but is never set. Set the attribute during session assocation.
* Set of seenSessionManagers is read but never populated
* Use WeakHashMap to fix memory leak of session manager instances in seenSessionManagers set following undeploy