org.sourceid.saml20.service.impl.proxy
Class IdpSessionRegistryProxy

java.lang.Object
  extended by org.sourceid.saml20.service.impl.proxy.IdpSessionRegistryProxy
All Implemented Interfaces:
IdpSessionRegistry

public class IdpSessionRegistryProxy
extends java.lang.Object
implements IdpSessionRegistry

Chooses between an in-memory implementation or a multicast implementation at runtime depending on the configuration of the PingFederate server.

Author:
Brian Campbell

Constructor Summary
IdpSessionRegistryProxy()
           
 
Method Summary
 IdpHashableAuthnBean getAuthnBean(java.lang.String assertionId)
          Lookup the HashableAuthnBean that was registered against a remote session with the given asseriton id.
 java.util.List<Session> getIssuedSessions(IdpHashableAuthnBean authnBean)
          Gets all the sessions that have been issued to SP partners that are currently registered against the given HashableAuthnBean.
 java.util.Set<IdpHashableAuthnBean> getRegisteredAuthnBeans(java.lang.String sessionIdentifier)
          Looks up all the local application sessions (HashableAuthnBeans) associated with a given PingFederate session id.
 void registerSessionIssued(IdpHashableAuthnBean authnBean, Session session)
           Registers that a remote session was issued against a local application session represented by the HashableAuthnBean.
 void unregisterAuthnBean(IdpHashableAuthnBean authnBean)
          Unregister an authentication bean.
 Session unregisterSession(java.lang.String assertionId)
          Unregister and return a session by assertion id.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IdpSessionRegistryProxy

public IdpSessionRegistryProxy()
                        throws java.lang.IllegalAccessException,
                               java.lang.InstantiationException
Throws:
java.lang.IllegalAccessException
java.lang.InstantiationException
Method Detail

getRegisteredAuthnBeans

public java.util.Set<IdpHashableAuthnBean> getRegisteredAuthnBeans(java.lang.String sessionIdentifier)
                                                            throws SessionRegistryException
Description copied from interface: IdpSessionRegistry
Looks up all the local application sessions (HashableAuthnBeans) associated with a given PingFederate session id. This method is used by the server to figure out what local application session to end and what remote sessions at SP partners to end when doing SLO.

Specified by:
getRegisteredAuthnBeans in interface IdpSessionRegistry
Parameters:
sessionIdentifier - the PingFederate session identifier. See: IdpHashableAuthnBean.getPingFederateSessionId().
Returns:
a Set of all the HashableAuthnBeans that are currently registered with the given session identifier.
Throws:
SessionRegistryException - for any unexpected runtime problem that the implementation cannot handle.

unregisterAuthnBean

public void unregisterAuthnBean(IdpHashableAuthnBean authnBean)
                         throws SessionRegistryException
Description copied from interface: IdpSessionRegistry
Unregister an authentication bean. This method is invoked by the PingFederate server right after the logout method on the authentication adapter is invoked with the given HashableAuthnBean.

Specified by:
unregisterAuthnBean in interface IdpSessionRegistry
Parameters:
authnBean - the local session.
Throws:
SessionRegistryException - for any unexpected runtime problem that the implementation cannot handle.

registerSessionIssued

public void registerSessionIssued(IdpHashableAuthnBean authnBean,
                                  Session session)
                           throws SessionRegistryException
Description copied from interface: IdpSessionRegistry

Registers that a remote session was issued against a local application session represented by the HashableAuthnBean. The HashableAuthnBean also contains a reference to the PingFederate local session identifier IdpHashableAuthnBean.getPingFederateSessionId().

Note that the assertion id and the session index on the Session object will always be the same in this context because of the way PingFederate handles session indexes.

Specified by:
registerSessionIssued in interface IdpSessionRegistry
Parameters:
authnBean - the local application session (which contains a local session identifier).
session - the remote session.
Throws:
SessionRegistryException - for any unexpected runtime problem that the implementation cannot handle.

getIssuedSessions

public java.util.List<Session> getIssuedSessions(IdpHashableAuthnBean authnBean)
                                          throws SessionRegistryException
Description copied from interface: IdpSessionRegistry
Gets all the sessions that have been issued to SP partners that are currently registered against the given HashableAuthnBean.

Specified by:
getIssuedSessions in interface IdpSessionRegistry
Parameters:
authnBean - the local application session
Returns:
the list of Sessions.
Throws:
SessionRegistryException - for any unexpected runtime problem that the implementation cannot handle.

unregisterSession

public Session unregisterSession(java.lang.String assertionId)
                          throws SessionRegistryException
Description copied from interface: IdpSessionRegistry
Unregister and return a session by assertion id. This method is invoked by PingFederate during the SLO process. See Session.getAssertionId() and IdpHashableAuthnBean.getPingFederateSessionId().

Specified by:
unregisterSession in interface IdpSessionRegistry
Parameters:
assertionId - the assertion id.
Returns:
the Session object originally associated/registered with that assertion id.
Throws:
SessionRegistryException - for any unexpected runtime problem that the implementation cannot handle.

getAuthnBean

public IdpHashableAuthnBean getAuthnBean(java.lang.String assertionId)
                                  throws SessionRegistryException
Description copied from interface: IdpSessionRegistry
Lookup the HashableAuthnBean that was registered against a remote session with the given asseriton id.

Specified by:
getAuthnBean in interface IdpSessionRegistry
Parameters:
assertionId - the unique identifier of the assertion that was issued to an SP partner connection to create a remote session.
Returns:
the HashableAuthnBean that is associated with the given assertion id.
Throws:
SessionRegistryException - for any unexpected runtime problem that the implementation cannot handle.


Copyright 2007 Ping Identity Corp. All rights reserved.