Microsoft_WindowsAzure
[ class tree: Microsoft_WindowsAzure ] [ index: Microsoft_WindowsAzure ] [ all elements ]

Class: Microsoft_WindowsAzure_Credentials_SharedAccessSignature

Source Location: /WindowsAzure/Credentials/SharedAccessSignature.php

Class Overview

Microsoft_WindowsAzure_Credentials_CredentialsAbstract
   |
   --Microsoft_WindowsAzure_Credentials_SharedAccessSignature



Author(s):

Copyright:

  • Copyright (c) 2009 - 2011, RealDolmen (http://www.realdolmen.com)

Variables

Methods


Inherited Constants

Inherited Variables

Inherited Methods


Class Details

[line 46]


Tags:

copyright:  Copyright (c) 2009 - 2011, RealDolmen (http://www.realdolmen.com)
license:  http://phpazure.codeplex.com/license


[ Top ]


Class Variables

$_permissionSet = array()

[line 54]

Permission set



Tags:

access:  protected

Type:   array


[ Top ]



Class Methods


constructor __construct [line 64]

Microsoft_WindowsAzure_Credentials_SharedAccessSignature __construct( [string $accountName = Microsoft_WindowsAzure_Credentials_CredentialsAbstract::DEVSTORE_ACCOUNT], [string $accountKey = Microsoft_WindowsAzure_Credentials_CredentialsAbstract::DEVSTORE_KEY], [boolean $usePathStyleUri = false], [array $permissionSet = array()])

Creates a new Microsoft_WindowsAzure_Credentials_SharedAccessSignature instance



Tags:

access:  public


Overrides Microsoft_WindowsAzure_Credentials_CredentialsAbstract::__construct() (Creates a new Microsoft_WindowsAzure_Credentials_CredentialsAbstract instance)

Parameters:

string   $accountName   Account name for Windows Azure
string   $accountKey   Account key for Windows Azure
boolean   $usePathStyleUri   Use path-style URI's
array   $permissionSet   Permission set

[ Top ]

method createSignature [line 116]

string createSignature( [string $path = '/'], [string $resource = 'b'], [string $permissions = 'r'], [string $start = ''], [string $expiry = ''], [string $identifier = ''])

Create signature



Tags:

access:  public


Parameters:

string   $path   Path for the request
string   $resource   Signed resource - container (c) - blob (b)
string   $permissions   Signed permissions - read (r), write (w), delete (d) and list (l)
string   $start   The time at which the Shared Access Signature becomes valid.
string   $expiry   The time at which the Shared Access Signature becomes invalid.
string   $identifier   Signed identifier

[ Top ]

method createSignedQueryString [line 167]

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

Create signed query string



Tags:

access:  public


Parameters:

string   $path   Path for the request
string   $queryString   Query string for the request
string   $resource   Signed resource - container (c) - blob (b)
string   $permissions   Signed permissions - read (r), write (w), delete (d) and list (l)
string   $start   The time at which the Shared Access Signature becomes valid.
string   $expiry   The time at which the Shared Access Signature becomes invalid.
string   $identifier   Signed identifier

[ Top ]

method getPermissionSet [line 78]

array getPermissionSet( )

Get permission set



Tags:

access:  public


[ Top ]

method permissionMatchesRequest [line 207]

string permissionMatchesRequest( [string $permissionUrl = ''], [string $requestUrl = ''], [string $resourceType = Microsoft_WindowsAzure_Storage::RESOURCE_UNKNOWN], [string $requiredPermission = Microsoft_WindowsAzure_Credentials_CredentialsAbstract::PERMISSION_READ])

Permission matches request?



Tags:

return:  Signed request URL
access:  public


Parameters:

string   $permissionUrl   Permission URL
string   $requestUrl   Request URL
string   $resourceType   Resource type
string   $requiredPermission   Required permission

[ Top ]

method setPermissionSet [line 95]

void setPermissionSet( [array $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 Microsoft_WindowsAzure_Credentials_Microsoft_WindowsAzure_Credentials_SharedAccessSignature instance




Tags:

access:  public


Parameters:

array   $value   Permission set

[ Top ]

method signRequestHeaders [line 298]

array signRequestHeaders( [string $httpVerb = Microsoft_Http_Client::GET], [string $path = '/'], [string $queryString = ''], [array $headers = null], [boolean $forTableStorage = false], [string $resourceType = Microsoft_WindowsAzure_Storage::RESOURCE_UNKNOWN], [string $requiredPermission = Microsoft_WindowsAzure_Credentials_CredentialsAbstract::PERMISSION_READ], [mixed $rawData = null])

Sign request with credentials



Tags:

return:  Array of headers
access:  public


Overrides Microsoft_WindowsAzure_Credentials_CredentialsAbstract::signRequestHeaders() (Sign request headers with credentials)

Parameters:

string   $httpVerb   HTTP verb the request will use
string   $path   Path for the request
string   $queryString   Query string for the request
array   $headers   x-ms headers to add
boolean   $forTableStorage   Is the request for table storage?
string   $resourceType   Resource type
string   $requiredPermission   Required permission
mixed   $rawData   Raw post data

[ Top ]

method signRequestUrl [line 257]

string signRequestUrl( [string $requestUrl = ''], [string $resourceType = Microsoft_WindowsAzure_Storage::RESOURCE_UNKNOWN], [string $requiredPermission = Microsoft_WindowsAzure_Credentials_CredentialsAbstract::PERMISSION_READ])

Sign request URL with credentials



Tags:

return:  Signed request URL
access:  public


Overrides Microsoft_WindowsAzure_Credentials_CredentialsAbstract::signRequestUrl() (Sign request URL with credentials)

Parameters:

string   $requestUrl   Request URL
string   $resourceType   Resource type
string   $requiredPermission   Required permission

[ Top ]


Documentation generated on Wed, 18 May 2011 12:06:49 +0200 by phpDocumentor 1.4.3