azure-storage-common\src\Common\SharedAccessSignatureHelper.php
You may obtain a copy of the License at https://github.com/azure/azure-storage-php/LICENSE
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.
PHP version 5
- Author
- Azure Storage PHP SDK
- Category
- Microsoft
- Copyright
- Microsoft Corporation
- License
- https://github.com/azure/azure-storage-php/LICENSE
- Link
- https://github.com/azure/azure-storage-php
- Package
- MicrosoftAzure\Storage\Common\Internal\Authentication
\MicrosoftAzure\Storage\Common\SharedAccessSignatureHelper
- Children
- \MicrosoftAzure\Storage\Blob\BlobSharedAccessSignatureHelper
- \MicrosoftAzure\Storage\Table\TableSharedAccessSignatureHelper
- \MicrosoftAzure\Storage\Queue\QueueSharedAccessSignatureHelper
- \MicrosoftAzure\Storage\File\FileSharedAccessSignatureHelper
- Author
- Azure Storage PHP SDK
- Category
- Microsoft
- Copyright
- 2017 Microsoft Corporation
- License
- https://github.com/azure/azure-storage-php/LICENSE
- Link
- https://github.com/azure/azure-storage-php
Properties
Methods
__construct(string $accountName, string $accountKey) : void
Constructor.
Name | Type | Description |
---|---|---|
$accountName | string | the name of the storage account. |
$accountKey | string | the shared key of the storage account |
generateAccountSharedAccessSignatureToken(string $signedVersion, string $signedPermissions, string $signedService, string $signedResourceType, \Datetime | string $signedExpiry, \Datetime | string $signedStart = "", string $signedIP = "", string $signedProtocol = "") : string
Generates a shared access signature at the account level.
Name | Type | Description |
---|---|---|
$signedVersion | string | Specifies the signed version to use. |
$signedPermissions | string | Specifies the signed permissions for the account SAS. |
$signedService | string | Specifies the signed services accessible with the account SAS. |
$signedResourceType | string | Specifies the signed resource types that are accessible with the account SAS. |
$signedExpiry | \Datetime | string | The time at which the shared access signature becomes invalid, in an ISO 8601 format. |
$signedStart | \Datetime | string | The time at which the SAS becomes valid, in an ISO 8601 format. |
$signedIP | string | Specifies an IP address or a range of IP addresses from which to accept requests. |
$signedProtocol | string | Specifies the protocol permitted for a request made with the account SAS. |
Type | Description |
---|---|
string |
generateCanonicalResource(string $accountName, string $service, string $resource) : string
Generate the canonical resource using the given account name, service type and resource.
Name | Type | Description |
---|---|---|
$accountName | string | The account name of the service. |
$service | string | The service name of the service. |
$resource | string | The name of the resource. |
Type | Description |
---|---|
string |
validateAndSanitizeSignedPermissions(string $signedPermissions) : string
Validates and sanitizes the signed permissions parameter
Name | Type | Description |
---|---|---|
$signedPermissions | string | Specifies the signed permissions for the account SAS. |
Type | Description |
---|---|
string |
validateAndSanitizeSignedProtocol(string $signedProtocol) : string
Validates and sanitizes the signed protocol parameter
Name | Type | Description |
---|---|---|
$signedProtocol | string | Specifies the signed protocol for the account SAS. |
Type | Description |
---|---|
string |
validateAndSanitizeSignedResourceType(string $signedResourceType) : string
Validates and sanitizes the signed resource type parameter
Name | Type | Description |
---|---|---|
$signedResourceType | string | Specifies the signed resource types that are accessible with the account SAS. |
Type | Description |
---|---|
string |
validateAndSanitizeSignedService(string $signedService) : string
Validates and sanitizes the signed service parameter
Name | Type | Description |
---|---|---|
$signedService | string | Specifies the signed services accessible with the account SAS. |
Type | Description |
---|---|
string |