Re: auth-protect not defined for act
Andrew Stevens wrote: [me] I did the default build, so I had assumed Yes. How would I recognise it? Well, for starters, there'll be a cocoon-authentication-fw-block.jar in build/webapp/WEB-INF/lib... That's there: $ locate cocoon-authentication-fw-block.jar /usr/src/cocoon-2.1.8/build/webapp/WEB-INF/lib/cocoon-authentication-fw-block.jar /usr/local/apache-tomcat-5.5.12/webapps/ROOT/WEB-INF/lib/cocoon-authentication-fw-block.jar $ So the authentication-fw block must have been selected for inclusion. Unfortunately it doesn't mean anything to me as I don't speak Java. But presumably it means that the relevant bits and pieces *are* present in the build, so I can use them, if I can find some document which tells me which ones are needed and what they're called, right? And Bruno Dumon wrote: [me] I tried map:action name=auth-protect src=org.apache.cocoon.webapps.authentication.acting.ProtectAction/ [...] Just guessing class names isn't very effective indeed ;-) No, alas. Naming them after the action they perform would be far too easy :-) One way to know what exists is of course to check the source code. Only relevant, alas, if you speak Java. Another way is to go to here: http://cocoon.zones.apache.org/daisy/documentation/facetedBrowser/default and choose authentication-fw for CocoonBlock and Action for CocoonComponentReference, and this should show you a list of all actions in the authentication framework. Which unfortunately confirms my suspicion that there is no definition for auth-protect [yet]. If you do as above, the only four listed are AuthAction, LoggedInAction, LoginAction, and LogoutAction. The doc at http://cocoon.apache.org/2.1/developing/webapps/authentication.html describes very clearly the existence of a map:act type=auth-protect which appears to be fundamental to the authentication framework, but which causes a fatal error if you try to use it. Does anyone have a workaround for implementing simple sitemap auth? ///Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: auth-protect not defined for act
Peter Flynn wrote: Andrew Stevens wrote: [me] I did the default build, so I had assumed Yes. How would I recognise it? Well, for starters, there'll be a cocoon-authentication-fw-block.jar in build/webapp/WEB-INF/lib... That's there: $ locate cocoon-authentication-fw-block.jar /usr/src/cocoon-2.1.8/build/webapp/WEB-INF/lib/cocoon-authentication-fw-block.jar /usr/local/apache-tomcat-5.5.12/webapps/ROOT/WEB-INF/lib/cocoon-authentication-fw-block.jar $ So the authentication-fw block must have been selected for inclusion. Unfortunately it doesn't mean anything to me as I don't speak Java. But presumably it means that the relevant bits and pieces *are* present in the build, so I can use them, if I can find some document which tells me which ones are needed and what they're called, right? Confirming the .jar file exists only shows that the various code components (Actions, Generators, etc.) are available. You still have to make sure that your configuration files (cocoon.xconf, sitemap.xmap) are set up to make use of those components. And Bruno Dumon wrote: [me] I tried map:action name=auth-protect src=org.apache.cocoon.webapps.authentication.acting.ProtectAction/ [...] Just guessing class names isn't very effective indeed ;-) No, alas. Naming them after the action they perform would be far too easy :-) One way to know what exists is of course to check the source code. Only relevant, alas, if you speak Java. Not necessarily so; see below. Another way is to go to here: http://cocoon.zones.apache.org/daisy/documentation/facetedBrowser/default and choose authentication-fw for CocoonBlock and Action for CocoonComponentReference, and this should show you a list of all actions in the authentication framework. Which unfortunately confirms my suspicion that there is no definition for auth-protect [yet]. If you do as above, the only four listed are AuthAction, LoggedInAction, LoginAction, and LogoutAction. The doc at http://cocoon.apache.org/2.1/developing/webapps/authentication.html describes very clearly the existence of a map:act type=auth-protect which appears to be fundamental to the authentication framework, but which causes a fatal error if you try to use it. I've never used the authentication framework, but from looking at the source code it appears the auth-protect action type is typically mapped to the AuthAction class. Here are the action definitions distributed with the authentication-fw block: map:action name=auth-protect src=org.apache.cocoon.webapps.authentication.acting.AuthAction/ map:action name=auth-login src=org.apache.cocoon.webapps.authentication.acting.LoginAction/ map:action name=auth-logout src=org.apache.cocoon.webapps.authentication.acting.LogoutAction/ map:action name=auth-loggedIn src=org.apache.cocoon.webapps.authentication.acting.LoggedInAction/ Note that to find this I didn't have to speak Java at all. I just browsed into src/blocks/authentication-fw/conf, and looked at the files in that directory; the snippet above is pasted straight out of authentication-act.xmap. The files in that directory define the configuration values that are normally added to cocoon.xconf and sitemap.xmap when the block is built. You'll need to make sure they have been added to your versions of those files, since it seems yours are out of sync. --Jason - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: auth-protect not defined for act
On Wed, 2006-04-05 at 22:05 +0100, Peter Flynn wrote: Andrew Stevens wrote: From: Peter Flynn [EMAIL PROTECTED] Date: Tue, 04 Apr 2006 20:03:56 +0100 I added map:action name=auth-login src=org.apache.cocoon.webapps.authentication.acting.LoginAction/ to the map:components section of my sitemap Inside the map:actions, right? Yes. But -- g -- I has pasted it inside the LocaleAction definition, which in the sample sitemap is the only non-empty element there. Must have been late at night. So now that works, many thanks, but I now get the same class of error saying that auth-protect isn't defined. So taking a guess I tried map:action name=auth-protect src=org.apache.cocoon.webapps.authentication.acting.ProtectAction/ not expecting it to work, and I wasn't disappointed :-) How many more of these are there, and where are they documented? There's no mention of them in the pages about Authentication. Just guessing class names isn't very effective indeed ;-) One way to know what exists is of course to check the source code. Another way is to go to here: http://cocoon.zones.apache.org/daisy/documentation/facetedBrowser/default and choose authentication-fw for CocoonBlock and Action for CocoonComponentReference, and this should show you a list of all actions in the authentication framework. (note: not all blocks are in there yet, but the authentication-fw is) -- Bruno Dumon http://outerthought.org/ Outerthought - Open Source, Java XML Competence Support Center [EMAIL PROTECTED] [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: auth-protect not defined for act
From: Peter Flynn [EMAIL PROTECTED] Date: Wed, 05 Apr 2006 22:30:14 +0100 [EMAIL PROTECTED] wrote: Peter, I apologize if this has been asked before (I admit to coming somewhat late to this thread). When you built Cocoon, was the authentication-fw block selected for inclusion? I did the default build, so I had assumed Yes. How would I recognise it? ///Peter Well, for starters, there'll be a cocoon-authentication-fw-block.jar in build/webapp/WEB-INF/lib... Andrew. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: auth-protect not defined for act
From: Peter Flynn [EMAIL PROTECTED] Date: Wed, 05 Apr 2006 22:05:18 +0100 ... So now that works, many thanks, but I now get the same class of error saying that auth-protect isn't defined. So taking a guess I tried map:action name=auth-protect src=org.apache.cocoon.webapps.authentication.acting.ProtectAction/ not expecting it to work, and I wasn't disappointed :-) How many more of these are there, and where are they documented? There's no mention of them in the pages about Authentication. A quick grep auth sitemap.xmap gives map:generator label=content name=auth-conf src=org.apache.cocoon.webapps.authentication.generation.ConfigurationGenerator/ map:action name=auth-protect src=org.apache.cocoon.webapps.authentication.acting.AuthAction/ map:action name=auth-login src=org.apache.cocoon.webapps.authentication.acting.LoginAction/ map:action name=auth-logout src=org.apache.cocoon.webapps.authentication.acting.LogoutAction/ map:action name=auth-loggedIn src=org.apache.cocoon.webapps.authentication.acting.LoggedInAction/ Andrew. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
auth-protect not defined for act
Andrew Stevens wrote: From: Peter Flynn [EMAIL PROTECTED] Date: Tue, 04 Apr 2006 20:03:56 +0100 I added map:action name=auth-login src=org.apache.cocoon.webapps.authentication.acting.LoginAction/ to the map:components section of my sitemap Inside the map:actions, right? Yes. But -- g -- I has pasted it inside the LocaleAction definition, which in the sample sitemap is the only non-empty element there. Must have been late at night. So now that works, many thanks, but I now get the same class of error saying that auth-protect isn't defined. So taking a guess I tried map:action name=auth-protect src=org.apache.cocoon.webapps.authentication.acting.ProtectAction/ not expecting it to work, and I wasn't disappointed :-) How many more of these are there, and where are they documented? There's no mention of them in the pages about Authentication. ///Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: auth-protect not defined for act
[EMAIL PROTECTED] wrote: Peter, I apologize if this has been asked before (I admit to coming somewhat late to this thread). When you built Cocoon, was the authentication-fw block selected for inclusion? I did the default build, so I had assumed Yes. How would I recognise it? ///Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]