cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Ratcliffe" <>
Subject [auth-fw] Problem with flow-based authentication
Date Mon, 28 Feb 2005 23:30:45 GMT
I've been re-implementing some code to use the flow functions in place of
actions for authentication and
have run into a problem with redirecting vs invoking an internal pipeline
once the user has successfully
logged in.

I have a protected pipeline declared in my sitemap:

      <map:match pattern="locations/*">
        <map:call function="protect">
	  	<map:parameter name="handler" value="webserviceHandler"/>
          	<map:parameter name="protected-internal"
          	<map:parameter name="failure-redirect" value="login"/>

The login pipeline looks like this:

      <map:match pattern="login">
	<map:call function="login">
	  <map:parameter name="handler" value="webserviceHandler"/>
	  <map:parameter name="protected-internal"
	  <map:parameter name="failure-internal" value="challenge"/>

As you can see I'm requesting an internal 'redirection' if authentication is
successful using the original
request URI that has been set as the 'resource' parameter by the
authentication framework.  The issue is
that the original request URI contains the application context, for example:
For an external redirection the application segment of the path 'smartfind'
is matched by the HTTP server and
the top-level sitemap the resolves the remaining '/xml/locations/12345'
part, when this same URI is sent to the
top-level sitemap by sendPage() in the auth_checkAuthentication() function
it doesn't know what to do with the
'smartfind' segment.

I did consider changing the auth_checkAuthentication() function in auth.js
so that I could pass in my own
failure-redirect URI like:
'cocoon://xml/login?resource=internal/locations/{1}' but hesitated as this
like a more general issue, potentially affecting others also.

Anyone else had this problem and come up with a satisfactory solution?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message