You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Li, Wangqian" <wa...@medtronic.com> on 2004/03/01 15:17:27 UTC

authentication

Hi, Kieran,

I have a question on authentication. Could you help me on this?

I read somewhere that the cocoon action provides authentication functions. 
		<map:actions>
			<map:action name="authenticator" src="org.apache.cocoon.acting.DatabaseAuthenticatorAction"/>
		</map:actions>
For this to happen, a pipeline needs to be specified.
I did this:
		<map:match pattern="login">
				<map:act type="authenticator">
					<map:parameter name="descriptor" value="context://msdreport/defs/auth-def.xml"/>
					<map:redirect-to uri="xsp/success.xsp"/>
				</map:act>
				<map:redirect-to uri="xsp/fails.xsp"/>
		</map:match>
In the defs folder, I have the xml file:
	<auth-descriptor>
		<conection>msdprod</conection>
		<table name="msdrpt_webuser">
			<select dbco="rptuser" request-param="username" to-session="user"/>
			<select dbco="pwd" request-param="password"/>
		</table>
	</auth-descriptor>

When I run it, it always redirect to fail.xsp page. What could go wrong. 
I've tested the db connection and the underlying table is there.

Thanks for your help.

Wangqian







---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org