commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Philippe Poulard <>
Subject Re: [vfs] providing smb credentials somewhere other than the URI
Date Mon, 06 Jun 2005 13:58:53 GMT
Mario Ivankovits wrote:
> Hi!
>> Is it possible to pass username/password to the FileSystemManager or
>> some other object so that the URI doesn't need the username/password
>> combo?
> Currently: No.
> But I updated the todo list and added this as a feature of release 1.1.
> After this we should have a uniform way how to pass credentials to the 
> underlaying filesystem without the need to add them to the url.

what about using attributes as we talk in another post ?

moreover, user/pwd are attributes which name should be normalized
Map map = new HashMap();
// 2 attributes that are consumed by VFS
map.put( "org.apache.commons.vfs.User", user );
map.put( "org.apache.commons.vfs.Password", password );
// 1 attribute consumed by the XML:DB scheme
map.put( "org.apache.commons.vfs.provider.xmldb.ResourceType", 
"XMLResource" );
// 1 attribute consumed by the XML:DB provider
map.put( "", "myCluster" );

then create the file as you suggested previously :
FileObject.createFile( map );

an attribute consumed at a level is not passed to the next stage ; no 
confusion with the attribute names because one uses fully qualified 
names, so a target just have to announce that it consumes some attributes
just a problem to solve : how to deal with a scheme that may contain 
itself as a scheme, if attributes are used, which one is the target ?
do we have to prefix the attribute name :
"" -> the external scheme is the target
"" -> the internal scheme is the target
mmmh, unwrapping attribute names could be done automatically by VFS if 
this idea was retained

advice ?


           (. .)
|   Philippe Poulard    |

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

View raw message