Hi,
I have just been experimenting with the authentication system, below is the
pipelines section of my sitemap, which is now working, but this is a 2.1system.
Check carefully the documentation you have been using, I believe the authentication
system as evolved between 2.0.4 and 2.1 and some of the documentation on the
web site refers only to the new 2.1 system.
You may have a mixture of setting and configurations in your sitemap, some for
the 2.0.4 version and some for the 2.1 version
Tony
=============================================================================================================
<map:pipelines>
<map:component-configurations>
<authentication-manager>
<handlers>
<handler name="global">
<redirect-to uri="cocoon://login_page"/>
<authentication uri="cocoon:raw://check"/>
</handler>
</handlers>
</authentication-manager>
</map:component-configurations>
<!-- main pipeline -->
<map:pipeline>
<map:match pattern="check">
<map:generate type="serverpages" src="" />
<map:serialize type="xml" />
</map:match>
<map:match pattern="login_page">
<map:read mime-type="text/xhtml" src="">
</map:match>
<map:match pattern="**/*.jpg">
<map:read mime-type="images/jpeg" src="" />
</map:match>
<map:match pattern="login_ok">
<map:read mime-type="text/html" src="" />
</map:match>
<map:match pattern="login">
<map:act type="auth-login" >
<map:parameter name="handler" value="global" />
<map:parameter name="parameter_userid" value="{request-param:name}" />
<map:parameter name="parameter_password" value="{request-param:password}" />
<map:redirect-to uri="login_ok" />
</map:act>
<map:read mime-type="text/html" src="" />
</map:match>
<map:match pattern="logout">
<map:act type="auth-logout">
<map:parameter name="handler" value="global" />
<map:redirect-to uri="login_page" />
</map:act>
</map:match>
<map:match pattern="sage/*">
<map:mount check-reload="yes" src="" uri-prefix="sage"/>
</map:match>
</map:pipeline>
</map:pipelines>
===============================================================================================================
Ungvári Sándor <[EMAIL PROTECTED]>
16/03/2003 14:31
|
To: [EMAIL PROTECTED] cc: Subject: Auth-protect action problem |
Hi!
I'd like to use the user authentication in cocoon 2.0.4. but I always get
some errors. I've read much about this topic but I couldn't solve my
problem. Here is my sitemap:
...
<pipelines>
<map:component-configurations>
<authentication-manager>
<handlers>
<handler name="userPortal">
<redirect-to uri="login"/>
<authentication uri="userLogin"/>
</handler>
</handlers>
</authentication-manager>
</map:component-configurations>
<pipeline>
...
<map:match pattern="login">
<map:generate type="xsp" src=""> <map:serialize/>
</map:match>
<map:match pattern="userLogin">
<map:act type="auth-login">
<map:parameter name="handler" value
="userPortal"/>
<map:parameter name="parameter_userid"
value ="{request:user}"/>
<map:parameter name="parameter_password"
value="{request:password}"/>
<map:redirect-to uri="services"/>
</map:act>
<!-- authentication failed: Back to login-page -->
<map:generate type="xsp" src=""> <map:serialize/>
</map:match>
<map:match pattern="services">
<map:act type="auth-protect">
<map:parameter name="handler" value ="userPortal"/>
<map:read src="" mime-type="image/gif"/>
</map:act>
</map:match>
...
</pipeline>
...
type fatal
message UnnamedSelector: ComponentSelector could not find the component for
hint [auth-protect]
description org.apache.avalon.framework.component.ComponentException:
UnnamedSelector: ComponentSelector could not find the component for hint
[auth-protect]
sender org.apache.cocoon.servlet.CocoonServlet
Should I define anything like this
<map:components>
<map:actions>
<map:action name="auth-protect"
logger="sitemap.action.auth-protect"
src=""> <map:actions>
...
???
If I do this the result is:
message Error in sitemap configuration :
org.apache.cocoon.webapps.authentication.acting.AuthAction
description
org.apache.avalon.framework.configuration.ConfigurationException: Error in
sitemap configuration :
org.apache.cocoon.webapps.authentication.acting.AuthAction
sender org.apache.cocoon.servlet.CocoonServlet
Maybe I've to add something to cocoon.xconf? Or what?
Please HELP me!!! q:-)
Soma
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]