/** * Prepare for the beginning of active use of the public methods of this * component. This method should be called after <code>configure()</code>, * and before any of the public methods of the component are utilized. * * @exception LifecycleException if this component detects a fatal error * that prevents this component from being used */ public void start() throws LifecycleException { // START CR 6411114 if (started) // Ignore multiple starts return; super.start(); // END CR 6411114 if (debug >= 1) log(rb.getString(LogFacade.START_COMPONENT_INFO)); }
/** * Gracefully 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. * * @exception LifecycleException if this component detects a fatal error * that needs to be reported */ public void stop() throws LifecycleException { // START CR 6411114 if (!started) // Ignore stop if not started return; // END CR 6411114 if (debug >= 1) log(rb.getString(LogFacade.STOP_COMPONENT_INFO)); // START CR 6411114 super.stop(); // END CR 6411114 }
/** * Register the specified Principal as being associated with the specified * value for the single sign on identifier. * * @param ssoId Single sign on identifier to register * @param principal Associated user principal that is identified * @param authType Authentication type used to authenticate this * user principal * @param username Username used to authenticate this user * @param password Password used to authenticate this user */ protected void register(String ssoId, Principal principal, String authType, String username, char[] password, String realmName) { if (debug >= 1) { String msg = MessageFormat.format(rb.getString(LogFacade.REGISTERING_SSO_INFO), new Object[] {ssoId, principal.getName(), authType}); log(msg); } synchronized (cache) { cache.put(ssoId, new SingleSignOnEntry(ssoId, 0L, principal, authType, username, realmName)); } }
/** * Acknowledge the occurrence of the specified event. * * @param event SessionEvent that has occurred */ public void sessionEvent(SessionEvent event) { // We only care about session destroyed events if (!Session.SESSION_DESTROYED_EVENT.equals(event.getType())) return; // Look up the single session id associated with this session (if any) Session session = event.getSession(); if (debug >= 1) { String msg = MessageFormat.format(rb.getString(LogFacade.PROCESS_SESSION_DESTROYED_INFO), session); log(msg); } String ssoId = session.getSsoId(); if (ssoId == null) { return; } deregister(ssoId, session); }
log(msg); String msg = MessageFormat.format(rb.getString(LogFacade.PRINCIPAL_BEEN_AUTHENTICATED_INFO), hreq.getUserPrincipal()); log(msg); log(rb.getString(LogFacade.CHECK_SSO_COOKIE_INFO)); Cookie cookie = null; Cookie versionCookie = null; log(rb.getString(LogFacade.SSO_COOKIE_NOT_PRESENT_INFO)); return INVOKE_NEXT; log(msg); String msg = MessageFormat.format(rb.getString(LogFacade.FOUND_CACHED_PRINCIPAL_AUTH_TYPE_INFO), new Object[] {entry.getPrincipal().getName(), entry.getAuthType()}); log(msg); } else { if (debug >= 1) log(rb.getString(LogFacade.NO_CACHED_PRINCIPAL_FOUND_INFO)); cookie.setMaxAge(0); hres.addCookie(cookie);
/** * Associate the specified single sign on identifier with the * specified Session. * * @param ssoId Single sign on identifier * @param ssoVersion Single sign on version * @param session Session to be associated */ public void associate(String ssoId, long ssoVersion, Session session) { if (!started) { return; } if (debug >= 1) log(rb.getString(LogFacade.ASSOCIATE_SSO_WITH_SESSION_INFO)); SingleSignOnEntry sso = lookup(ssoId, ssoVersion); if (sso != null) { session.setSsoId(ssoId); session.setSsoVersion(ssoVersion); sso.addSession(this, session); } }