Skip to content

SharedKeyCredential

Shared Key authentication: signs every request with an HMAC-SHA256 over the storage account key, the way AzureBlobClient always used to before AzureCredential existed.

final class SharedKeyCredential implements AzureCredential

ImplementsAzureCredential
SourceSharedKeyCredential.php

public function __construct(string $accountKey): mixed

ParameterTypeDescription
$accountKeystring

Returns mixed

MethodDescription
authorizationHeader(string $accountName, string $method, string $path, array<string, string> $query, array<string, string> $headers): string

public function authorizationHeader(string $accountName, string $method, string $path, array<string, string> $query, array<string, string> $headers): string

The request’s headers, including x-ms-date and x-ms-version, before Authorization is added.

ParameterTypeDescription
$accountNamestring
$methodstring
$pathstring
$queryarray``<``string``, ``string``>Signed as part of the canonicalized resource.
$headersarray``<``string``, ``string``>The request’s headers, including x-ms-date and x-ms-version, before Authorization is added.

Returns string