cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Joseph <pjoseph...@yahoo.com>
Subject Re: authentication framework and continuations
Date Thu, 14 Oct 2004 11:05:16 GMT
I will try this.

Two questions:

1. So for this to work there is no need to use
encodeURL? I was under the impression that encodeURL
was needed as the auth framework created a session
behind the scenes.

2. How are you matching the *.continue i.e.

If I use
<map:match type="request-parameter"
pattern="continuation-id"> instead of 

<map:match pattern="*.continue">
I get the following msg.

org.apache.cocoon.ResourceNotFoundException: No
pipeline matched request:
webtask/array/3b3639336a20303b2b63112f7046410573643157.continue

thx
Paul

--- Jorg Heymans <jh@domek.be> wrote:

> Put the <map:call continuation> tag inside of the
> auth-protect block. 
> Your forms are inside a protected area, so your
> continuations will be 
> called with a "protected" URL.
> 
> My working setup is like
> 
> <map:match pattern="protected/**">
>    <map:act type="auth-protect">
> 
>       <map:match type="request-parameter"
> pattern="continuation-id">
>         <map:call contination="{1}"/>
>       </map:match>
> 
>       <map:match pattern="protected/doaction1">
>          ....
>       </map:match>
>       <map:match pattern="protected/doaction2">
>           ....
>       </map:match>
>       <map:match pattern="protected/thisfile.html">
> 	 ...
>       </map:match>
>    </map:act>
> </map:match>
> 
> HTH
> Jorg
> 
> Paul Joseph wrote:
> > Hi,
> > 
> > Thank you for your respones.
> > 
> > I can take out the encodeURL and the same thing
> > happens...I thought I needed it to maintain
> session -
> > no?
> > 
> > The way I do it is as follows:
> > 
> > <map:match pattern="*.continue"><!--this is the
> > problem area-->
> >   <map:call continuation="{1}"/>
> >  </map:match>
> > 
> > <!--these *seem* to work ok-->
> > <map:match pattern="arrayadmin-display-pipeline">
> >   <map:act type="auth-protect">  <!-- check
> > authentication -->
> >     <map:parameter name="handler"
> > value="simpleauthenticator"/>
> >   <map:generate src="arrayadmin_template.xml"/>
> >   <map:transform type="forms"/>
> >   <map:transform type="i18n">
> >     <map:parameter name="locale" value="en-US"/>
> >   </map:transform>
> >   <map:transform
> >
>
src="context://resources/resources/forms-arrayadmin-styling.xsl"/>
> >   <map:transform type="encodeURL"/>
> >   <map:serialize/>
> >   </map:act>
> > </map:match>
> > 
> > <map:match pattern="arrayAdmin">
> >   <map:act type="auth-protect">  <!-- check
> > authentication -->
> >     <map:parameter name="handler"
> > value="simpleauthenticator"/>
> >   <map:call function="arrayAdmin">
> >   <map:parameter name="bindingURI"
> > value="arrayadmin_bind.xml"/> 
> >   </map:call>
> >   </map:act>
> > </map:match>
> > 
> > </map:pipeline>
> > </map:pipelines>
> > 
> > 
> > --- Jorg Heymans <jh@domek.be> wrote:
> > 
> > 
> >>There is a continuation id construct you can use
> to
> >>set it as a hidden 
> >>variable in your form (<ft:continuation-id> IIRC),
> >>try using this. Don't 
> >>know if you URL encoding is interfering. How do
> you
> >>encodeURL btw?
> >>
> >>Jorg
> >>
> >>Paul Joseph wrote:
> >>
> >>>Hi,
> >>>
> >>>I have implented an authentication handler and
> all
> >>>works well as far as authentication of a given
> >>
> >>page -
> >>
> >>>if the user is not logged in, (s)he gets
> >>
> >>redirected to
> >>
> >>>the right login page etc.
> >>>
> >>>However, I am having one problem - dealing with
> >>
> >>the
> >>
> >>>following lines in the sitemap:
> >>>
> >>><map:match pattern="*.continue">
> >>>   <map:call continuation="{1}"/>
> >>></map:match>
> >>>
> >>>I get the following error:
> >>>cause: org.apache.cocoon.ProcessingException: No
> >>>function nor continuation given in <map:call
> >>
> >>function>
> >>
> >>>at
> >>>
> >>
> >
>
file:/C:/Tomcat/webapps/cocoon/webtask/array/sitemap.xmap:28:33
> > 
> >>>I am using encodeURL before anything that gets
> >>>serialized.
> >>>
> >>>TIA!
> >>>-Paul
> >>
> >>
> >>
> >
>
---------------------------------------------------------------------
> > 
> >>To unsubscribe, e-mail:
> >>users-unsubscribe@cocoon.apache.org
> >>For additional commands, e-mail:
> >>users-help@cocoon.apache.org
> >>
> >>
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail:
> users-help@cocoon.apache.org
> 
> 


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


Mime
View raw message