> > > +1. Any thoughts on how the provider might get hold of the user's
> > > authentication info (usernames, passwords, certs, etc)?
> > Encoding this stuff
> > > in the url is ok as a convenience, but isn't a very good
> > general solution.
> > > I guess we need some kind of authentication provider that can
> > be handed to
> > > the ssh provider; Something that the ftp, smb, dav, whatever
> > providers can
> > > also make use of.
> >
> > I think about a call back Interface, call by provider to required
any
> > information (String). The user application provide implementation
for
> > this Interface (automatic answer, swing dialog box,...).
> > like :
> >
> > public interface Replier {
> >
> > public void needProperties(Property[] properties) throws
Exception;
> > }
> >
> > public class Property {
> > public String name;
> > public String value;
> > public String defaultValue;
> > }
> >
> > name and defaultValue are set by FSProvider before call
needProperties.
> > value are set by Replier implementation.
> >
> > Your opinion ?
>
> That looks fine. We'll need to come up with a naming scheme for
> common properties like the username for a particular
> protocol+hostname(+port), and
> a password for a particular username+protocol+hostname.
user.login, user.password,
> I guess another option could be to subclass Property with
> classes that provide this info to
> the Replier.
I think, my write was bad (like my english).
Replier is a bad name, I propose PropertiesValueSetter :
--
package org.apache.commons.vfs;
/**
* Interface call by FileSystem(Provider) when it needs informations.
* This interface is a gateway, used by VFS to request information to
* user application.
* So the user application provide implementation for this Interface
* (automatic answer, swing dialog box,...).
*/
public interface PropertiesValueSetter {
/**
* Method call by FileSystem(Provider) to request properties.
* Property's value is set by this method.
* Property's name and defaultValue were set by caller.
*
* @param fs FileSystem fo which properties are needs.
* @param message optionnal message used by
* fs to describe needs (for end-user).
* @param prop Array of requested properties (inout)
* @exception Exception if problem.
*/
public void setProperties(FileSystem fs,
String message,
Property[] prop) throws Exception ;
}
--
package org.apache.commons.vfs;
/**
* Data structure used to store request part
* (name, defaultValue) and the answser part (value)
* of property.
*
* predefine names are :
* <ul>
* <li>user.login : when login connexion is needed.</li>
* <li>user.password : when password connexion is needed.</li>
* </ul>
*/
public class Property {
public String name;
public String value;
public String defaultValue;
}
--
--
*---------------------------------------------------------*
| Contrary to popular belief, UNIX is user-friendly. It |
| just happens to be selective on who it makes friendship |
| with. |
| - Richard Cook |
*---------------------------------------------------------*
--
To unsubscribe, e-mail: <mailto:commons-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@;jakarta.apache.org>