cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter.Urba...@mediacenter.nl
Subject Betr.: Re: Betr.: authentication-fw
Date Mon, 02 May 2005 16:34:41 GMT





Andre Juffer <Andre.Juffer@oulu.fi> wrote on 02-05-2005 14:42:19:

> Peter.Urbanus@mediacenter.nl wrote:
> >
> >
> >
> >
> > Andre Juffer <ajuffer@sun3.oulu.fi> wrote on 30-04-2005 14:52:29:
> >
> >
> >>Peter and others,
> >>
> >>concerning the authentication resource, I eventually found the
following
> >>in core.log:
> >>
> >>DEBUG   (2005-04-30) 15:28.26:711   [core.authentication-manager]
> >>(/sopas/do-login) http-8080-Processor25/PipelineAuthen
> >>ticator: BEGIN isValidAuthenticationFragment fragment=<?xml
> >>version="1.0" encoding="UTF-8"?>
> >
> > When the PipelineAuthenticator starts validating the XML fragment, it
> > prints the entire fragment to the log. So at that point, your entire
> > fragment is
> >       <?xml version="1.0" encoding="UTF-8"?>
> > and nothing else, no <authentication> etc.
> >
> > Perhaps this helps?
>
> Actually, in the log file, there is an empty line just below
> DEBUG   (2005-04-30) 15:28.26:711   [core.authentication-manager]
> (/sopas/do-login) http-8080-Processor25/PipelineAuthen
> ticator: BEGIN isValidAuthenticationFragment fragment=<?xml
> version="1.0" encoding="UTF-8"?>
>
> While the authenticator definitly returns the correct response (see
> previous emails), the rest of the document is not available to the
> PipelineAuthenticator, it apparently just gets the first line. By
> looking at the source code of PipelineAuthenticator, I thought initially
> that the <?xml version="1.0" encoding="UTF-8"?> should not be there,
> just the XML itself, but this seems rubbish now.
>
> I guess I somehow need to get rid of new lines characters or spaces or
> whatsoever in the returned XML document, so that the
> PipelineAuthenticator sees one line only. Maybe that is the solution to
> this. So, instead of
>
> <?xml version="1.0" encoding="UTF-8"?>
> <authentication>
> ...
> </authentication>
>
> I would need to generate
>
> <?xml version="1.0"
encoding="UTF-8"?><authentication>...</authentication>
>
> (this all is one line).
>
I would be surprised if it was the whitespace. But I have no explanation
yet. So while nobody steps in and tells us what the problem is, we'll just
have to stumble forward. Let's see what we have:
- When you type ...authenticate.xxx in your browser, you get the right XML
- When authenticate.xxx is called during authentication, it is mostly empty
So there must be *some* difference. The only differences I can think of are
request parameters. So you could test a situation where request parameters
cannot screw you up. You could simply create an XML somedir/test.xml like
this:
  <?xml version="1.0" encoding="UTF-8"?>
  <authentication>
    <ID>Me</ID>
  </authentication>
And then change your sitemap like this:
  <map:match pattern="authenticate.xxx">
    <map:generate src="somedir/test.xml" />
    <map:serialize type="xml" />
  </map:match>
If this works (it must!) there are only three possibilities left (that I
can think of):
- the extra match <map:match type="request-parameter" pattern="userid"> is
wrong
- something in authenticate.xsl
- something fishy in the XML produced by the XML database.
I've never worked with XML databases, so I can't help you there.

Best of luck,
Peter


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


Mime
View raw message