Class AuthAzureStorage
- All Implemented Interfaces:
AutoCloseable
Authenticate Azure Storage REST requests with account-key Shared Key signing.
Chilkat.AuthAzureStorage is a credential object for Azure
Storage Services authentication. It stores the storage account name, Base64
account access key, Azure Storage service type, authentication scheme, and
x-ms-version API version used when signing REST requests for
Blob, Queue, File, or Table storage.
Azure Storage credentials
Hold the storage account name and Base64 account access key used to sign Azure Storage REST requests.
Shared Key signing
Configure Azure Storage authentication using SharedKey or
SharedKeyLite, depending on the service and request style.
Service targeting
Specify the Azure Storage service being accessed, such as
Blob, Queue, File, or
Table.
API version header
Set the x-ms-version value required by the Azure Storage
REST API version being used.
REST integration
Use the configured object with Chilkat.Rest so requests are
signed automatically before being sent.
Low-level control
Pair this authentication object with manually constructed REST requests when application code needs direct control over Azure Storage operations.
Common pattern:
Create an AuthAzureStorage object, set the storage
Account, Base64 AccessKey, Service,
Scheme, and XMsVersion, then attach it to a
Chilkat.Rest request workflow. Use
AuthAzureStorage for Shared Key authorization headers; use
Chilkat.AuthAzureSAS when the request should be authorized with
a SAS query token instead.
For an extended overview, see AuthAzureStorage Class Overview.
</section>
Instances hold a native Chilkat object: close them with ChilkatObject.close() (try-with-resources) when
done; an unclosed instance is freed when it becomes unreachable.
- See Also:
- Online reference
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionA valid base64 access key for the Azure storage account.The Azure storage account name.Can beSharedKeyorSharedKeyLite.Can beBlob,Queue,File, orTable.If set, automatically adds thex-ms-versionHTTP request header to Azure Storage requests.voidsetAccessKey(String value)Sets theAccessKeyproperty; seegetAccessKey().voidsetAccount(String value)Sets theAccountproperty; seegetAccount().voidSets theSchemeproperty; seegetScheme().voidsetService(String value)Sets theServiceproperty; seegetService().voidsetXMsVersion(String value)Sets theXMsVersionproperty; seegetXMsVersion().Methods inherited from class com.chilkatsoft.chilkat2.ChilkatObject
close, getDebugLogFilePath, getLastErrorHtml, getLastErrorText, getLastErrorXml, getLastMethodSuccess, getVerboseLogging, getVersion, isClosed, setDebugLogFilePath, setLastMethodSuccess, setVerboseLogging, toString
-
Constructor Details
-
AuthAzureStorage
public AuthAzureStorage()Creates a newAuthAzureStorageobject.
-
-
Method Details
-
getAccessKey
A valid base64 access key for the Azure storage account.- Returns:
- the value of the
AccessKeyproperty
-
setAccessKey
Sets theAccessKeyproperty; seegetAccessKey().- Parameters:
value- the new value (notnull)
-
getAccount
The Azure storage account name. (A storage account can contain zero or more containers. A container contains properties, metadata, and zero or more blobs. A blob is any single entity comprised of binary data, properties, and metadata. )- Returns:
- the value of the
Accountproperty
-
setAccount
Sets theAccountproperty; seegetAccount().- Parameters:
value- the new value (notnull)
-
getScheme
Can beSharedKeyorSharedKeyLite. The default value isSharedKey.- Returns:
- the value of the
Schemeproperty
-
setScheme
Sets theSchemeproperty; seegetScheme().- Parameters:
value- the new value (notnull)
-
getService
Can beBlob,Queue,File, orTable. The default isBlob.Note: Authentication for the
Tableservice did not work in versions prior to v9.5.0.83.- Returns:
- the value of the
Serviceproperty
-
setService
Sets theServiceproperty; seegetService().- Parameters:
value- the new value (notnull)
-
getXMsVersion
If set, automatically adds thex-ms-versionHTTP request header to Azure Storage requests. The default value is2014-02-14.- Returns:
- the value of the
XMsVersionproperty
-
setXMsVersion
Sets theXMsVersionproperty; seegetXMsVersion().- Parameters:
value- the new value (notnull)
-