Jeremy Quinn wrote:


On 8 Dec 2003, at 13:33, Jean-Christophe Kermagoret wrote:



Hello Jeremy, thanks for your feedback.

1st method is ok.
I'd like to use the second method too, but :
* I get null handler with cocoon.parameters["handler"]


this is a param passed from my sitemap to my flowscript, it is the name of the authorisation handler

<map:component-configurations>
    <authentication-manager>
        <handlers>
            <handler name="myAuthorisation">
                <redirect-to uri="cocoon:/login"/>
                <authentication uri="cocoon:raw:/authenticate"/>
            </handler>
        </handlers>
    </authentication-manager>
</map:component-configurations>

. . .

<map:match pattern="do-login">
    <!-- try to login -->
    <map:call function="woody">
        <map:parameter name="function" value="login"/>
        . . .
        <map:parameter name="handler" value="myAuthorisation"/>
        . . .
    </map:call>
</map:match>

function login(form) {
  . . .
  var handler = cocoon.parameters["handler"];
  . . .
}

* and what is authParams ?


These are the parameters that get passed to the 'authenticate' pipeline.

See cocoon/src/blocks/authentication-fw/java/org/apache/cocoon/webapps/ authentication/flow/javascript/auth.js

See the function called 'auth_login'.

I took this and adapted it to return the UserHandler rather than a boolean.

Jeremy,


Is it more useful to return a UserHandler than a boolean? The auth.js code is experimental, and can thus be changed. If you can supply a usecase as to why it should be changed, personally, I'd say go ahead and commit a change. It is good to have real users using the code, as what I came up with was just a first iteration.

Regards, Upayavira



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to