List of usage examples for org.apache.commons.vfs.util UserAuthenticatorUtils cleanup
public static void cleanup(UserAuthenticationData authData)
From source file:org.jclouds.vfs.provider.blobstore.BlobStoreFileProvider.java
protected FileSystem doCreateFileSystem(final FileName name, final FileSystemOptions fileSystemOptions) throws FileSystemException { BlobStoreFileName rootName = (BlobStoreFileName) name; UserAuthenticationData authData = null; BlobStoreContext context;/*from w w w . j av a 2 s. c o m*/ try { String uriToParse = rootName.getFriendlyURI(); authData = UserAuthenticatorUtils.authenticate(fileSystemOptions, AUTHENTICATOR_TYPES); URI location = HttpUtils.createUri(uriToParse); context = new BlobStoreContextFactory().createContext(location.getHost(), UserAuthenticatorUtils .toString(UserAuthenticatorUtils.getData(authData, UserAuthenticationData.USERNAME, UserAuthenticatorUtils.toChar(rootName.getUserName()))), UserAuthenticatorUtils .toString(UserAuthenticatorUtils.getData(authData, UserAuthenticationData.PASSWORD, UserAuthenticatorUtils.toChar(rootName.getPassword()))), modules, new Properties()); } finally { UserAuthenticatorUtils.cleanup(authData); } return new BlobStoreFileSystem(rootName, context, fileSystemOptions); }