azure-storage-common\src\Common\SharedAccessSignatureHelper.php

Show: PublicProtectedPrivateinherited
Table of Contents
LICENSE: The MIT License (the "License") you may not use this file except in compliance with the License.

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

Package: MicrosoftAzure\Storage\Common
Provides methods to generate Azure Storage Shared Access Signature
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

>VPropertyprotected$accountKey
Details
Type
n/a
>VPropertyprotected$accountName
Details
Type
n/a

Methods

methodpublic__construct(string $accountName, string $accountKey) : void

Constructor.

Parameters
NameTypeDescription
$accountNamestring

the name of the storage account.

$accountKeystring

the shared key of the storage account

methodpublicgenerateAccountSharedAccessSignatureToken(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.

Parameters
NameTypeDescription
$signedVersionstring

Specifies the signed version to use.

$signedPermissionsstring

Specifies the signed permissions for the account SAS.

$signedServicestring

Specifies the signed services accessible with the account SAS.

$signedResourceTypestring

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.

$signedIPstring

Specifies an IP address or a range of IP addresses from which to accept requests.

$signedProtocolstring

Specifies the protocol permitted for a request made with the account SAS.

Returns
TypeDescription
string
Details
See
an account SAS at https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/constructing-an-account-sas  
methodprotectedgenerateCanonicalResource(string $accountName, string $service, string $resource) : string
static

Generate the canonical resource using the given account name, service type and resource.

Parameters
NameTypeDescription
$accountNamestring

The account name of the service.

$servicestring

The service name of the service.

$resourcestring

The name of the resource.

Returns
TypeDescription
string
methodprotectedvalidateAndSanitizeSignedPermissions(string $signedPermissions) : string

Validates and sanitizes the signed permissions parameter

Parameters
NameTypeDescription
$signedPermissionsstring

Specifies the signed permissions for the account SAS.

Returns
TypeDescription
string
methodprotectedvalidateAndSanitizeSignedProtocol(string $signedProtocol) : string

Validates and sanitizes the signed protocol parameter

Parameters
NameTypeDescription
$signedProtocolstring

Specifies the signed protocol for the account SAS.

Returns
TypeDescription
string
methodprotectedvalidateAndSanitizeSignedResourceType(string $signedResourceType) : string

Validates and sanitizes the signed resource type parameter

Parameters
NameTypeDescription
$signedResourceTypestring

Specifies the signed resource types that are accessible with the account SAS.

Returns
TypeDescription
string
methodprotectedvalidateAndSanitizeSignedService(string $signedService) : string

Validates and sanitizes the signed service parameter

Parameters
NameTypeDescription
$signedServicestring

Specifies the signed services accessible with the account SAS.

Returns
TypeDescription
string
methodprotectedvalidateAndSanitizeStringWithArray(string $input,  $array) : string

Removes duplicate characters from a string

Parameters
NameTypeDescription
$inputstring

The input string.

$array
Returns
TypeDescription
string
Documentation was generated by phpDocumentor 2.9.1.