public class SharedAccessSignatureHelper extends Object
| Modifier and Type | Method and Description |
|---|---|
static UriQueryBuilder |
generateSharedAccessSignatureForBlob(SharedAccessBlobPolicy policy,
SharedAccessBlobHeaders headers,
String groupPolicyIdentifier,
String resourceType,
String signature)
Get the complete query builder for creating the Shared Access Signature query.
|
static UriQueryBuilder |
generateSharedAccessSignatureForQueue(SharedAccessQueuePolicy policy,
String groupPolicyIdentifier,
String signature)
Get the complete query builder for creating the Shared Access Signature query.
|
static UriQueryBuilder |
generateSharedAccessSignatureForTable(SharedAccessTablePolicy policy,
String startPartitionKey,
String startRowKey,
String endPartitionKey,
String endRowKey,
String accessPolicyIdentifier,
String tableName,
String signature,
String accountKeyName)
Get the complete query builder for creating the Shared Access Signature query.
|
static String |
generateSharedAccessSignatureHashForBlob(SharedAccessBlobPolicy policy,
SharedAccessBlobHeaders headers,
String accessPolicyIdentifier,
String resourceName,
ServiceClient client,
OperationContext opContext)
Get the signature hash embedded inside the Shared Access Signature for blob service.
|
static String |
generateSharedAccessSignatureHashForQueue(SharedAccessQueuePolicy policy,
String accessPolicyIdentifier,
String resourceName,
ServiceClient client,
OperationContext opContext)
Get the signature hash embedded inside the Shared Access Signature for queue service.
|
static String |
generateSharedAccessSignatureHashForTable(SharedAccessTablePolicy policy,
String accessPolicyIdentifier,
String resourceName,
String startPartitionKey,
String startRowKey,
String endPartitionKey,
String endRowKey,
ServiceClient client,
OperationContext opContext)
Get the signature hash embedded inside the Shared Access Signature for blob service.
|
static StorageCredentialsSharedAccessSignature |
parseQuery(HashMap<String,String[]> queryParams)
Parses the query parameters and populates a StorageCredentialsSharedAccessSignature object if one is present.
|
public static UriQueryBuilder generateSharedAccessSignatureForBlob(SharedAccessBlobPolicy policy, SharedAccessBlobHeaders headers, String groupPolicyIdentifier, String resourceType, String signature) throws StorageException
policy - The shared access policy to hash.groupPolicyIdentifier - An optional identifier for the policy.resourceType - Either "b" for blobs or "c" for containers.signature - The signature to use.IllegalArgumentExceptionStorageExceptionpublic static UriQueryBuilder generateSharedAccessSignatureForQueue(SharedAccessQueuePolicy policy, String groupPolicyIdentifier, String signature) throws StorageException
policy - The shared access policy to hash.groupPolicyIdentifier - An optional identifier for the policy.signature - The signature to use.IllegalArgumentExceptionStorageExceptionpublic static UriQueryBuilder generateSharedAccessSignatureForTable(SharedAccessTablePolicy policy, String startPartitionKey, String startRowKey, String endPartitionKey, String endRowKey, String accessPolicyIdentifier, String tableName, String signature, String accountKeyName) throws StorageException
StorageExceptionpublic static String generateSharedAccessSignatureHashForBlob(SharedAccessBlobPolicy policy, SharedAccessBlobHeaders headers, String accessPolicyIdentifier, String resourceName, ServiceClient client, OperationContext opContext) throws InvalidKeyException, StorageException
policy - The shared access policy to hash.headers - The optional header values to set for a blob accessed with this shared access signature.accessPolicyIdentifier - An optional identifier for the policy.resourceName - The resource name.client - The ServiceClient associated with the object.opContext - An object used to track the execution of the operationInvalidKeyExceptionStorageExceptionpublic static String generateSharedAccessSignatureHashForQueue(SharedAccessQueuePolicy policy, String accessPolicyIdentifier, String resourceName, ServiceClient client, OperationContext opContext) throws InvalidKeyException, StorageException
policy - The shared access policy to hash.accessPolicyIdentifier - An optional identifier for the policy.resourceName - The resource name.client - The ServiceClient associated with the object.opContext - An object used to track the execution of the operationInvalidKeyExceptionStorageExceptionpublic static String generateSharedAccessSignatureHashForTable(SharedAccessTablePolicy policy, String accessPolicyIdentifier, String resourceName, String startPartitionKey, String startRowKey, String endPartitionKey, String endRowKey, ServiceClient client, OperationContext opContext) throws InvalidKeyException, StorageException
policy - The shared access policy to hash.accessPolicyIdentifier - An optional identifier for the policy.resourceName - The resource name.client - The ServiceClient associated with the object.opContext - An object used to track the execution of the operationInvalidKeyExceptionStorageExceptionpublic static StorageCredentialsSharedAccessSignature parseQuery(HashMap<String,String[]> queryParams) throws StorageException
queryParams - The parameters to parseIllegalArgumentExceptionStorageException - An exception representing any error which occurred during the operation./**
* Copyright Microsoft Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/