AZSStorageCredentials Class Reference
Inherits from | NSObject |
---|---|
Declared in | AZSStorageCredentials.h AZSStorageCredentials.m |
Overview
AZSStorageCredentials is used to store credentials used to authenticate Storage Requests.
AZSStorageCredentials can be created with a Storage account name and account key for Shared Key access, or with a SAS token (forthcoming.) Sample usage with SharedKey authentication:
AZSStorageCredentials *storageCredentials = [[AZSStorageCredentials alloc] initWithAccountName:<name> accountKey:<key>];
AZSCloudStorageAccount *storageAccount = [[AZSCloudStorageAccount alloc] initWithCredentials:storageCredentials useHttps:YES];
AZSCloudBlobClient *blobClient = [storageAccount getBlobClient];
Other Methods
– initWithAccountName:accountKey:
Initializes a newly allocated AZSStorageCredentials object
- (instancetype)initWithAccountName:(NSString *)accountName accountKey:(NSString *)accountKey
Parameters
accountName |
The name of the account. |
---|---|
accountKey |
The account key used for signing requests. |
Return Value
The newly allocated instance.
Discussion
Initializes a newly allocated AZSStorageCredentials object
Declared In
AZSStorageCredentials.h
– initWithSASToken:
Initializes a newly allocated AZSStorageCredentials object. These credentials will not be usable with an Account SAS until the accountName is set.
- (instancetype)initWithSASToken:(NSString *)sasToken
Parameters
sasToken |
The Shared Access Signature token used for access. |
---|
Return Value
The newly allocated instance.
Discussion
Initializes a newly allocated AZSStorageCredentials object. These credentials will not be usable with an Account SAS until the accountName is set.
Declared In
AZSStorageCredentials.h
– initWithSASToken:accountName:
Initializes a newly allocated AZSStorageCredentials object
- (instancetype)initWithSASToken:(NSString *)sasToken accountName:(NSString *)accountName
Parameters
sasToken |
The Shared Access Signature token used for access. |
---|---|
accountName |
The name of the account. |
Return Value
The newly allocated instance.
Discussion
Initializes a newly allocated AZSStorageCredentials object
Declared In
AZSStorageCredentials.h
Other Methods
accountName
The name of the account.
@property (copy, readonly, AZSNullable) NSString *accountName
Discussion
The name of the account.
Declared In
AZSStorageCredentials.h
accountKey
The storage key used to access the account.
@property (copy, readonly, AZSNullable) NSData *accountKey
Discussion
The storage key used to access the account.
Declared In
AZSStorageCredentials.h
sasToken
The SAS token used to access.
@property (copy, readonly, AZSNullable) NSString *sasToken
Discussion
The SAS token used to access.
Declared In
AZSStorageCredentials.h