You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Hugo Burm <hu...@xs4all.nl> on 2003/05/31 12:20:42 UTC

authentication fw: flowscript in authentication resource

Hello

I am trying to use flowscript in the authentication resource of the
authentication framework.
authuser is my authentication resource. 

Part of sitemap:
 <!-- call flowscript -->
 <map:match pattern="authuser">
            <map:call function="auth"/>
 </map:match>
 <!-- called by sendPage -->
 <map:match pattern="userID">
            <map:generate src="userID.xml" />
            <map:serialize type = "xml" />
 </map:match>

This is the flowscript function:
function auth() {
  sendPage("userID", {"user" : "test"} );
 }
 
And this is the "userID" xml file called by sendPage:
<?xml version="1.0"?>
<authentication>
<ID>23</ID>
<data><name>hugob</name></data>
</authentication>

When I call the resource directly by appname/authuser, the sitemap matches
the authusr and the flowscript returns the content of the xml file as
expected.  When I use it as an authentication resource, I get a null pointer
exception.
This is from core.log:
	at
org.apache.cocoon.webapps.authentication.components.Authenticator.authentica
te(Authenticator.java:187)
	... 61 more
org.apache.cocoon.ProcessingException: Attempted to process incomplete
pipeline.
	at
org.apache.cocoon.components.source.impl.SitemapSource.init(SitemapSource.ja
va:377)

When I use userID as my authentication resource (and skip the flowscript
step), authentication works OK.

What is going wrong? Is it just impossible to use flowscript in this
resource?