cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim Gritsenko" <vadim.gritse...@verizon.net>
Subject RE: How to pass authentication data to a Source?
Date Fri, 02 Aug 2002 11:40:45 GMT
> From: Conal Tuohy [mailto:conalt@paradise.net.nz]
> 
> > > It seems to me that the Source can implement Configurable,
> > Contextualizable,
> > > or Parameterizable, and then extract the credentials from its
> > Configuration,
> > > Context, or Parameter. Is that right? Any suggestions? Can anyone
> > point me
> > > at some code which implements something similar?
> >
> > Context is one per application, Configuration and Parameters
> > are one per
> > Source type (in your case - one configuration per all instances of
> > MailSource).
> >
> > I would suggest embedding auth parameters into the URL, as
> > this is done
> > with ftp and http protocols:
> >
> > http://username:password@host:port/path/file.ext#anchor
> 
> Thanks Vadim - I'll go with that.
> 
> Just to get this clear though - if my Source was a Generator instead,
could
> I pass parameters to it on a per-pipeline basis, just by implementing
> Parameterizable?

Yes.

Vadim


> e.g.
> 
> <map:match pattern="mail/*/*/*">
> 	<map:generate type="mail" src="{1}">
> 		<map:parameter name="username" value="{2}">
> 		<map:parameter name="password" value="{3}">
> 	</map:generate>
> 	etc.


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


Mime
View raw message