org.gaul.s3proxy.AuthenticationType Java Examples

The following examples show how to use org.gaul.s3proxy.AuthenticationType. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: S3ProxyImpl.java    From pravega with Apache License 2.0 6 votes vote down vote up
public S3ProxyImpl(String endpoint, S3Config s3Config) {
    URI uri = URI.create(endpoint);

    Properties properties = new Properties();
    properties.setProperty("s3proxy.authorization", "none");
    properties.setProperty("s3proxy.endpoint", endpoint);
    properties.setProperty("jclouds.provider", "filesystem");
    properties.setProperty("jclouds.filesystem.basedir", "/tmp/s3proxy");

    ContextBuilder builder = ContextBuilder
            .newBuilder("filesystem")
            .credentials("x", "x")
            .modules(ImmutableList.<Module>of(new SLF4JLoggingModule()))
            .overrides(properties);
    BlobStoreContext context = builder.build(BlobStoreContext.class);
    BlobStore blobStore = context.getBlobStore();
    s3Proxy = S3Proxy.builder().awsAuthentication(AuthenticationType.AWS_V2_OR_V4, "x", "x")
                     .endpoint(uri)
                     .keyStore("", "")
                     .blobStore(blobStore)
                     .ignoreUnknownHeaders(true)
                     .build();
    client = new S3JerseyCopyPartClient(s3Config);
}
 
Example #2
Source File: S3ProxyRule.java    From s3proxy with Apache License 2.0 5 votes vote down vote up
public Builder withCredentials(AuthenticationType authType,
        String accessKey, String secretKey) {
    this.authType = authType;
    this.accessKey = accessKey;
    this.secretKey = secretKey;
    return this;
}
 
Example #3
Source File: S3ProxyRule.java    From s3proxy with Apache License 2.0 4 votes vote down vote up
public Builder withCredentials(String accessKey, String secretKey) {
    return withCredentials(AuthenticationType.AWS_V2_OR_V4, accessKey,
        secretKey);
}