Search in sources :

Example 1 with StorageCredentialsAnonymous

use of com.microsoft.azure.storage.StorageCredentialsAnonymous in project camel by apache.

the class BlobServiceComponent method checkCredentials.

private void checkCredentials(BlobServiceConfiguration cfg) {
    CloudBlob client = cfg.getAzureBlobClient();
    StorageCredentials creds = client == null ? cfg.getCredentials() : client.getServiceClient().getCredentials();
    if ((creds == null || creds instanceof StorageCredentialsAnonymous) && !cfg.isPublicForRead()) {
        throw new IllegalArgumentException("Credentials must be specified.");
    }
}
Also used : CloudBlob(com.microsoft.azure.storage.blob.CloudBlob) StorageCredentials(com.microsoft.azure.storage.StorageCredentials) StorageCredentialsAnonymous(com.microsoft.azure.storage.StorageCredentialsAnonymous)

Aggregations

StorageCredentials (com.microsoft.azure.storage.StorageCredentials)1 StorageCredentialsAnonymous (com.microsoft.azure.storage.StorageCredentialsAnonymous)1 CloudBlob (com.microsoft.azure.storage.blob.CloudBlob)1