Examples of StaticUserAuthenticator


Examples of org.apache.commons.vfs2.auth.StaticUserAuthenticator

   * @throws FileSystemException file system configuration could not be build
   */
    @Deprecated
  public static void initS3Provider(final String awsKeyId, final String awsKey) throws FileSystemException {
    // create authenticator
    final StaticUserAuthenticator userAuthenticator = new StaticUserAuthenticator(null, awsKeyId, awsKey);
    final FileSystemOptions options = S3FileProvider.getDefaultFileSystemOptions();
    DefaultFileSystemConfigBuilder.getInstance().setUserAuthenticator(options, userAuthenticator);
    log.info("s3 provider initialized");
  }
View Full Code Here

Examples of org.apache.commons.vfs2.auth.StaticUserAuthenticator

     * @see org.springframework.beans.factory.FactoryBean#getObject()
     */
    @Override
    public FileSystemManager getObject() throws Exception {
        // Configure VFS
        StaticUserAuthenticator auth = new StaticUserAuthenticator(null, awsAccessKey, awsSecretKey);
        FileSystemOptions opts = S3FileProvider.getDefaultFileSystemOptions();
        DefaultFileSystemConfigBuilder.getInstance().setUserAuthenticator(opts, auth);

        return VFS.getManager();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.