Moodle  2.2.1
http://www.collinsharper.com
Zend_Service_WindowsAzure_Credentials_SharedAccessSignature Class Reference
Inheritance diagram for Zend_Service_WindowsAzure_Credentials_SharedAccessSignature:
Collaboration diagram for Zend_Service_WindowsAzure_Credentials_SharedAccessSignature:

Public Member Functions

 __construct ($accountName=Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::DEVSTORE_ACCOUNT, $accountKey=Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::DEVSTORE_KEY, $usePathStyleUri=false, $permissionSet=array())
 getPermissionSet ()
 setPermissionSet ($value=array())
 createSignature ($path= '/', $resource= 'b', $permissions= 'r', $start= '', $expiry= '', $identifier= '')
 createSignedQueryString ($path= '/', $queryString= '', $resource= 'b', $permissions= 'r', $start= '', $expiry= '', $identifier= '')
 permissionMatchesRequest ($permissionUrl= '', $requestUrl= '', $resourceType=Zend_Service_WindowsAzure_Storage::RESOURCE_UNKNOWN, $requiredPermission=Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::PERMISSION_READ)
 signRequestUrl ($requestUrl= '', $resourceType=Zend_Service_WindowsAzure_Storage::RESOURCE_UNKNOWN, $requiredPermission=Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::PERMISSION_READ)
 signRequestHeaders ($httpVerb=Zend_Http_Client::GET, $path= '/', $queryString= '', $headers=null, $forTableStorage=false, $resourceType=Zend_Service_WindowsAzure_Storage::RESOURCE_UNKNOWN, $requiredPermission=Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::PERMISSION_READ)

Protected Attributes

 $_permissionSet = array()

Detailed Description

Definition at line 43 of file SharedAccessSignature.php.


Constructor & Destructor Documentation

Creates a new Zend_Service_WindowsAzure_Credentials_SharedAccessSignature instance

Parameters:
string$accountNameAccount name for Windows Azure
string$accountKeyAccount key for Windows Azure
boolean$usePathStyleUriUse path-style URI's
array$permissionSetPermission set

Definition at line 61 of file SharedAccessSignature.php.


Member Function Documentation

createSignature ( path = '/',
resource = 'b',
permissions = 'r',
start = '',
expiry = '',
identifier = '' 
)

Create signature

Parameters:
string$pathPath for the request
string$resourceSigned resource - container (c) - blob (b)
string$permissionsSigned permissions - read (r), write (w), delete (d) and list (l)
string$startThe time at which the Shared Access Signature becomes valid.
string$expiryThe time at which the Shared Access Signature becomes invalid.
string$identifierSigned identifier
Returns:
string

Definition at line 113 of file SharedAccessSignature.php.

Here is the caller graph for this function:

createSignedQueryString ( path = '/',
queryString = '',
resource = 'b',
permissions = 'r',
start = '',
expiry = '',
identifier = '' 
)

Create signed query string

Parameters:
string$pathPath for the request
string$queryStringQuery string for the request
string$resourceSigned resource - container (c) - blob (b)
string$permissionsSigned permissions - read (r), write (w), delete (d) and list (l)
string$startThe time at which the Shared Access Signature becomes valid.
string$expiryThe time at which the Shared Access Signature becomes invalid.
string$identifierSigned identifier
Returns:
string

Definition at line 164 of file SharedAccessSignature.php.

Here is the call graph for this function:

Get permission set

Returns:
array

Definition at line 75 of file SharedAccessSignature.php.

Here is the caller graph for this function:

permissionMatchesRequest ( permissionUrl = '',
requestUrl = '',
resourceType = Zend_Service_WindowsAzure_Storage::RESOURCE_UNKNOWN,
requiredPermission = Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::PERMISSION_READ 
)

Permission matches request?

Parameters:
string$permissionUrlPermission URL
string$requestUrlRequest URL
string$resourceTypeResource type
string$requiredPermissionRequired permission
Returns:
string Signed request URL

Definition at line 204 of file SharedAccessSignature.php.

Here is the caller graph for this function:

setPermissionSet ( value = array())

Set permisison set

Warning: fine-grained permissions should be added prior to coarse-grained permissions. For example: first add blob permissions, end with container-wide permissions.

Warning: the signed access signature URL must match the account name of the Zend_Service_WindowsAzure_Credentials_Zend_Service_WindowsAzure_Credentials_SharedAccessSignature instance

Parameters:
array$valuePermission set
Returns:
void

Definition at line 92 of file SharedAccessSignature.php.

signRequestHeaders ( httpVerb = Zend_Http_Client::GET,
path = '/',
queryString = '',
headers = null,
forTableStorage = false,
resourceType = Zend_Service_WindowsAzure_Storage::RESOURCE_UNKNOWN,
requiredPermission = Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::PERMISSION_READ 
)

Sign request with credentials

Parameters:
string$httpVerbHTTP verb the request will use
string$pathPath for the request
string$queryStringQuery string for the request
array$headersx-ms headers to add
boolean$forTableStorageIs the request for table storage?
string$resourceTypeResource type
string$requiredPermissionRequired permission
Returns:
array Array of headers

Reimplemented from Zend_Service_WindowsAzure_Credentials_CredentialsAbstract.

Definition at line 294 of file SharedAccessSignature.php.

Sign request URL with credentials

Parameters:
string$requestUrlRequest URL
string$resourceTypeResource type
string$requiredPermissionRequired permission
Returns:
string Signed request URL

Reimplemented from Zend_Service_WindowsAzure_Credentials_CredentialsAbstract.

Definition at line 254 of file SharedAccessSignature.php.

Here is the call graph for this function:


Field Documentation

$_permissionSet = array() [protected]

Definition at line 51 of file SharedAccessSignature.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations