cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject cvs commit: xml-cocoon2/src/java/org/apache/cocoon/webapps/authentication/components AuthenticationManager.java Handler.java
Date Mon, 29 Apr 2002 08:52:07 GMT
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" <cdas@accordiasys.com>
  
  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 <a href="mailto:cziegeler@s-und-n.de">Carsten Ziegeler</a>
  - * @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 <a href="mailto:cziegeler@s-und-n.de">Carsten Ziegeler</a>
  - * @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


Mime
View raw message