Package com.sun.enterprise.security.web
Class GlassFishSingleSignOn
- java.lang.Object
-
- org.apache.catalina.valves.ValveBase
-
- org.apache.catalina.authenticator.SingleSignOn
-
- com.sun.enterprise.security.web.GlassFishSingleSignOn
-
- All Implemented Interfaces:
SingleSignOnMBean,Runnable,Contained,Lifecycle,SessionListener,Valve,GlassFishValve
- Direct Known Subclasses:
HASingleSignOn
public class GlassFishSingleSignOn extends SingleSignOn implements Runnable, SingleSignOnMBean
A Valve that supports a "single sign on" user experience, where the security identity of a user who successfully authenticates to one web application is propogated to other web applications in the same security domain.- Author:
- Jyri Virkki (first implementation), Jean-Francois Arcand
-
-
Field Summary
-
Fields inherited from class org.apache.catalina.authenticator.SingleSignOn
cache, info
-
Fields inherited from class org.apache.catalina.valves.ValveBase
container, controller, debug, domain, lifecycle, log, next, oname, rb, started
-
Fields inherited from interface org.glassfish.web.valve.GlassFishValve
END_PIPELINE, INVOKE_NEXT
-
Fields inherited from interface org.apache.catalina.Lifecycle
AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, INIT_EVENT, START_EVENT, STOP_EVENT
-
-
Constructor Summary
Constructors Constructor Description GlassFishSingleSignOn()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidderegister(String ssoId)Deregister the specified single sign on identifier, and invalidate any associated sessions.intgetActiveSessionCount()Gets the number of sessions participating in SSOintgetHitCount()Gets the number of SSO cache hitsintgetMaxInactive()Return max idle time for SSO entries (seconds)intgetMissCount()Gets the number of SSO cache missesintgetReapInterval()Return expire thread interval (seconds)intinvoke(Request request, Response response)Perform single-sign-on support processing for this request.protected voidremoveSession(String ssoId, Session session)Remove a single Session from a SingleSignOn.voidrun()The background thread that checks for SSO timeouts and shutdown.voidsessionEvent(SessionEvent event)Acknowledge the occurrence of the specified event.voidsetMaxInactive(int t)Set max idle time for SSO entries (seconds)voidsetReapInterval(int t)Set expire thread interval (seconds)voidstart()Prepare for the beginning of active use of the public methods of this component.voidstop()Gracefully terminate the active use of the public methods of this component.-
Methods inherited from class org.apache.catalina.authenticator.SingleSignOn
associate, deregister, getDebug, getInfo, isVersioningSupported, log, log, lookup, lookup, register, setDebug, toString
-
Methods inherited from class org.apache.catalina.valves.ValveBase
addLifecycleListener, backgroundProcess, createObjectName, event, findLifecycleListeners, getContainer, getController, getDomain, getNext, getObjectName, getParentName, invoke, isStarted, postInvoke, removeLifecycleListener, setContainer, setController, setNext, setObjectName
-
-
-
-
Method Detail
-
getReapInterval
public int getReapInterval()
Return expire thread interval (seconds)
-
setReapInterval
public void setReapInterval(int t)
Set expire thread interval (seconds)
-
getMaxInactive
public int getMaxInactive()
Return max idle time for SSO entries (seconds)
-
setMaxInactive
public void setMaxInactive(int t)
Set max idle time for SSO entries (seconds)
-
start
public void start() throws LifecycleExceptionPrepare for the beginning of active use of the public methods of this component. This method should be called afterconfigure(), and before any of the public methods of the component are utilized.- Specified by:
startin interfaceLifecycle- Overrides:
startin classSingleSignOn- Throws:
LifecycleException- if this component detects a fatal error that prevents this component from being used
-
stop
public void stop() throws LifecycleExceptionGracefully terminate the active use of the public methods of this component. This method should be the last one called on a given instance of this component.- Specified by:
stopin interfaceLifecycle- Overrides:
stopin classSingleSignOn- Throws:
LifecycleException- if this component detects a fatal error that needs to be reported
-
sessionEvent
public void sessionEvent(SessionEvent event)
Acknowledge the occurrence of the specified event.- Specified by:
sessionEventin interfaceSessionListener- Overrides:
sessionEventin classSingleSignOn- Parameters:
event- SessionEvent that has occurred
-
invoke
public int invoke(Request request, Response response)
Perform single-sign-on support processing for this request.- Specified by:
invokein interfaceGlassFishValve- Overrides:
invokein classSingleSignOn- Parameters:
request- The servlet request we are processingresponse- The servlet response we are creating- Returns:
- the valve flag
-
deregister
protected void deregister(String ssoId)
Deregister the specified single sign on identifier, and invalidate any associated sessions.- Parameters:
ssoId- Single sign on identifier to deregister
-
run
public void run()
The background thread that checks for SSO timeouts and shutdown.
-
removeSession
protected void removeSession(String ssoId, Session session)
Remove a single Session from a SingleSignOn. Called when a session is timed out and no longer active.- Parameters:
ssoId- Single sign on identifier from which to remove the session.session- the session to be removed.
-
getActiveSessionCount
public int getActiveSessionCount()
Gets the number of sessions participating in SSO- Specified by:
getActiveSessionCountin interfaceSingleSignOnMBean- Returns:
- Number of sessions participating in SSO
-
getHitCount
public int getHitCount()
Gets the number of SSO cache hits- Specified by:
getHitCountin interfaceSingleSignOnMBean- Returns:
- Number of SSO cache hits
-
getMissCount
public int getMissCount()
Gets the number of SSO cache misses- Specified by:
getMissCountin interfaceSingleSignOnMBean- Returns:
- Number of SSO cache misses
-
-