cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sonny Sukumar <>
Subject Cocoon 2.1 Authentication Bug? *Please* Help
Date Mon, 25 Aug 2003 21:58:35 GMT

Hi guys,

I could not get any help for my problem on the Cocoon
Users list, so this is my last resort.  I am using
Cocoon 2.1 (with Tomcat 4.1.12 with JDK 1.4.1_01).  I 
would very much appreciate your help. 

PROBLEM: I don't think the auth-login (LoginAction) is
working right.  If I use <authentication
uri="cocoon:/authenticateAdmin"/> in the handler, I 
always get a NullPointerException in

at line 290 (that line is 'DocumentFragment
authenticationFragment =
doc.createDocumentFragment();').  On the other hand,
if I use the raw:/ protocol as in <authentication
uri="cocoon:/raw:/authenticateAdmin"/>, then I ALWAYS
get forwarded to the redirect page, which should never
happen with auth-login from what I understand from the

So can someone explain the reason for using the
"raw:/" protocol in the <authentication> tag in the
handler? It is there in the documentation
and it

1.) ALWAYS causes a redirect to the pipeline set in
the <redirect-to> handler tag (for both valid and
invalid user name/password combinations), and 
2.) A printout of the "resource" request param on the
redirected page shows the user name and password


It's also kind of strange how the 1st set is opposite
the 2nd set (password first, user name second).  My
login test form makes one enter user name first, and
password second (like any ordinary login form).

Ok, now here's the relevant sitemap contents:

        <!-- Authenticates site administrators. -->
        <handler name="adminAuthHandler">
          <!-- Doesn't work, with or without 'raw:/'
as explained above-->


      <!-- Generate and display the login page.-->
      <map:match pattern="getAdminLoginPage">
        <map:generate src="myapp/xml/adminLogin.xsp"
        <map:transform type="session"/>
        <map:serialize type="xml"/>

      <!-- Try to log in the admin. -->
      <map:match pattern="adminLogin">
        <map:act type="auth-login">
          <map:parameter name="handler"
          <map:parameter name="parameter_userName" 
          <map:parameter name="parameter_password" 


        <!-- Authentication failed -->

      <!-- My auth resource, as defined in the
handler. -->
      <map:match pattern="authenticateAdmin">
        <map:serialize type="xml"/>

      <map:match pattern="adminLogout">
        <map:act type="auth-logout">
          <map:parameter name="handler"
            | ::UNRESOLVED ISSUE:: SS 08/19/03
            | Admin logout succeeded, so tell admin in
some way, perhaps
            | a static page.


            | ::UNRESOLVED ISSUE:: SS 08/19/03
            | Admin logout failed. Is that even
possible?  What to do here?

Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

View raw message