Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.server.security.util.impl
Class SessionLogoutServiceImpl

java.lang.Object
  extended by eu.esdihumboldt.hale.server.security.util.impl.SessionLogoutServiceImpl
All Implemented Interfaces:
SessionLogoutService, SessionTracker

public class SessionLogoutServiceImpl
extends Object
implements SessionTracker, SessionLogoutService

Service that tracks sessions and allows logout from multiple sessions associated to the same user.
To be populated through addLoginSession(HttpSession, Authentication) , e.g. by the MultiWarSessionAuthenticationStrategy, while SpringSessionTrackerListener removes expired sessions.

Author:
Simon Templer

Field Summary
static String SESSION_ATTRIBUTE_PRINCIPAL
          The attribute name under which the principal is stored, under which it was added to the service.
 
Constructor Summary
SessionLogoutServiceImpl()
           
 
Method Summary
 void addLoginSession(javax.servlet.http.HttpSession session, org.springframework.security.core.Authentication authentication)
          Add a session after the user was authenticated.
 void addSession(javax.servlet.http.HttpSession session)
          Add a session.
 void logout(org.springframework.security.core.Authentication authentication)
          Logout the user authenticated by the given authentication object.
 void removeSession(javax.servlet.http.HttpSession session)
          Remove a session.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SESSION_ATTRIBUTE_PRINCIPAL

public static final String SESSION_ATTRIBUTE_PRINCIPAL
The attribute name under which the principal is stored, under which it was added to the service.

See Also:
Constant Field Values
Constructor Detail

SessionLogoutServiceImpl

public SessionLogoutServiceImpl()
Method Detail

addLoginSession

public void addLoginSession(javax.servlet.http.HttpSession session,
                            org.springframework.security.core.Authentication authentication)
Description copied from interface: SessionLogoutService
Add a session after the user was authenticated.

Specified by:
addLoginSession in interface SessionLogoutService
Parameters:
session - the HTTP session
authentication - the successful authentication
See Also:
SessionLogoutService.addLoginSession(HttpSession, Authentication)

logout

public void logout(org.springframework.security.core.Authentication authentication)
Description copied from interface: SessionLogoutService
Logout the user authenticated by the given authentication object.

Specified by:
logout in interface SessionLogoutService
Parameters:
authentication - the user authentication
See Also:
SessionLogoutService.logout(Authentication)

addSession

public void addSession(javax.servlet.http.HttpSession session)
Description copied from interface: SessionTracker
Add a session.

Specified by:
addSession in interface SessionTracker
Parameters:
session - the HTTP session
See Also:
SessionTracker.addSession(HttpSession)

removeSession

public void removeSession(javax.servlet.http.HttpSession session)
Description copied from interface: SessionTracker
Remove a session.

Specified by:
removeSession in interface SessionTracker
Parameters:
session - the HTTP session
See Also:
SessionTracker.removeSession(HttpSession)

Humboldt Alignment Editor 2.5.0

Build 2012-12-03_12-30-59
Revision 9d2dd4b0318cda9f1393b1ddd390f7f792d70a2d