Search in sources :

Example 1 with BlobRequestSigner

use of org.jclouds.blobstore.BlobRequestSigner in project dhis2-core by dhis2.

the class JCloudsAppStorageService method getSignedGetContentUri.

public URI getSignedGetContentUri(String key) {
    BlobRequestSigner signer = blobStoreContext.getSigner();
    if (!requestSigningSupported(signer)) {
        return null;
    }
    HttpRequest httpRequest;
    try {
        httpRequest = signer.signGetBlob(config.container, key, FIVE_MINUTES_IN_SECONDS);
    } catch (UnsupportedOperationException uoe) {
        return null;
    }
    return httpRequest.getEndpoint();
}
Also used : HttpRequest(org.jclouds.http.HttpRequest) LocalBlobRequestSigner(org.jclouds.blobstore.LocalBlobRequestSigner) BlobRequestSigner(org.jclouds.blobstore.BlobRequestSigner)

Aggregations

BlobRequestSigner (org.jclouds.blobstore.BlobRequestSigner)1 LocalBlobRequestSigner (org.jclouds.blobstore.LocalBlobRequestSigner)1 HttpRequest (org.jclouds.http.HttpRequest)1