Return-Path: Delivered-To: apmail-xml-cocoon-cvs-archive@xml.apache.org Received: (qmail 63643 invoked by uid 500); 29 Apr 2002 08:52:09 -0000 Mailing-List: contact cocoon-cvs-help@xml.apache.org; run by ezmlm Precedence: bulk Reply-To: cocoon-dev@xml.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list cocoon-cvs@xml.apache.org Received: (qmail 63634 invoked by uid 500); 29 Apr 2002 08:52:09 -0000 Delivered-To: apmail-xml-cocoon2-cvs@apache.org Date: 29 Apr 2002 08:52:07 -0000 Message-ID: <20020429085207.38496.qmail@icarus.apache.org> From: cziegeler@apache.org To: xml-cocoon2-cvs@apache.org Subject: cvs commit: xml-cocoon2/src/java/org/apache/cocoon/webapps/authentication/components AuthenticationManager.java Handler.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N cziegeler 02/04/29 01:52:07 Modified: src/java/org/apache/cocoon/webapps/authentication/components AuthenticationManager.java Handler.java Log: Improvements to the authentication framework Submitted by: "Chitharanjan Das" Revision Changes Path 1.4 +10 -2 xml-cocoon2/src/java/org/apache/cocoon/webapps/authentication/components/AuthenticationManager.java Index: AuthenticationManager.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/webapps/authentication/components/AuthenticationManager.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- AuthenticationManager.java 19 Apr 2002 11:02:58 -0000 1.3 +++ AuthenticationManager.java 29 Apr 2002 08:52:07 -0000 1.4 @@ -97,7 +97,7 @@ * This is the basis authentication component. * * @author Carsten Ziegeler - * @version CVS $Id: AuthenticationManager.java,v 1.3 2002/04/19 11:02:58 cziegeler Exp $ + * @version CVS $Id: AuthenticationManager.java,v 1.4 2002/04/29 08:52:07 cziegeler Exp $ */ public final class AuthenticationManager extends AbstractSessionComponent @@ -1079,7 +1079,15 @@ } // remove context context.removeXML(logoutHandlerName); - ((SessionContextImpl)this.getSessionManager().getContext(AuthenticationConstants.SESSION_CONTEXT_NAME)).cleanParametersCache(logoutHandlerName); + // FIXME (CZ): The sessionContextImpl should not be null, but + // it is sometimes. Why? + SessionContextImpl sessionContextImpl = (SessionContextImpl) + (this.getSessionManager().getContext(AuthenticationConstants.SESSION_CONTEXT_NAME)); + if (sessionContextImpl != null) { + sessionContextImpl.cleanParametersCache(logoutHandlerName); + } else if (this.getLogger().isDebugEnabled()) { + this.getLogger().debug("AuthenticationManager:logout() - sessionContextImpl is null"); + } Handler logoutHandler = (Handler)this.getHandler(logoutHandlerName); // reset application load status 1.3 +5 -4 xml-cocoon2/src/java/org/apache/cocoon/webapps/authentication/components/Handler.java Index: Handler.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/webapps/authentication/components/Handler.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- Handler.java 19 Apr 2002 11:02:58 -0000 1.2 +++ Handler.java 29 Apr 2002 08:52:07 -0000 1.3 @@ -68,7 +68,7 @@ * The authentication Handler. * * @author Carsten Ziegeler - * @version CVS $Id: Handler.java,v 1.2 2002/04/19 11:02:58 cziegeler Exp $ + * @version CVS $Id: Handler.java,v 1.3 2002/04/29 08:52:07 cziegeler Exp $ */ public final class Handler implements java.io.Serializable { @@ -142,9 +142,10 @@ throw new ConfigurationException("Handler '"+this.name+"' needs a redirect-to URI."); this.redirectURI = child.getAttribute("uri"); if ( this.redirectURI.startsWith("cocoon://") ) { - this.redirectURI = this.redirectURI.substring("cocoon://".length()); + this.redirectURI = this.redirectURI.substring("cocoon://".length()).trim(); + this.redirectURI = request.getContextPath()+"/"+this.redirectURI; } else if ( this.redirectURI.startsWith("cocoon:/") ) { - this.redirectURI = this.redirectURI.substring("cocoon:/".length()); + this.redirectURI = this.redirectURI.substring("cocoon:/".length()).trim(); } this.redirectParameters = SourceParameters.create(child); @@ -363,4 +364,4 @@ public String toString() { return "authentication-Handler " + this.name; } -} \ No newline at end of file +} ---------------------------------------------------------------------- In case of troubles, e-mail: webmaster@xml.apache.org To unsubscribe, e-mail: cocoon-cvs-unsubscribe@xml.apache.org For additional commands, e-mail: cocoon-cvs-help@xml.apache.org