Documentation

AbstractAuth
in package
implements AuthInterface

AbstractYes

Azure storage abstract auth class

Tags
category

Pop

author

Nick Sagona, III nick@popphp.org

copyright

Copyright (c) 2009-2026 Nick Sagona, III

license

https://www.popphp.org/license New BSD License

version
3.0.0

Table of Contents

Interfaces

AuthInterface
Azure storage auth interface

Properties

$accountKey  : string|null
Account key
$accountName  : string|null
Account name

Methods

generateSasToken()  : string
Generate a service SAS token for a blob
getAccountKey()  : string|null
Get account key
getAccountName()  : string|null
Get account name
getAuthorizationHeader()  : string
Returns authorization header to be included in the request.
getBaseUri()  : string
Get account key
hasAccountKey()  : bool
Has account key
hasAccountName()  : bool
Has account name
setAccountKey()  : AbstractAuth
Set account key
setAccountName()  : AbstractAuth
Set account name
signRequest()  : Request
Adds authentication header to the request headers.

Properties

$accountKey

Account key

protected string|null $accountKey = null

$accountName

Account name

protected string|null $accountName = null

Methods

generateSasToken()

Generate a service SAS token for a blob

public abstract generateSasToken(string $resourcePath, int $expiresInSeconds[, string $permissions = 'r' ][, DateTime|null $expiresAt = null ]) : string
Parameters
$resourcePath : string

e.g. '/container/blob.txt'

$expiresInSeconds : int
$permissions : string = 'r'

e.g. 'r' for read-only

$expiresAt : DateTime|null = null

explicit expiry, overriding $expiresInSeconds (mainly for tests)

Return values
string

getAccountKey()

Get account key

public getAccountKey() : string|null
Return values
string|null

getAccountName()

Get account name

public getAccountName() : string|null
Return values
string|null

getAuthorizationHeader()

Returns authorization header to be included in the request.

public abstract getAuthorizationHeader(array<string|int, mixed> $headers, string $url, array<string|int, mixed> $queryParams, string $httpMethod) : string
Parameters
$headers : array<string|int, mixed>
$url : string
$queryParams : array<string|int, mixed>
$httpMethod : string
Return values
string

getBaseUri()

Get account key

public getBaseUri() : string
Return values
string

hasAccountKey()

Has account key

public hasAccountKey() : bool
Return values
bool

hasAccountName()

Has account name

public hasAccountName() : bool
Return values
bool

        
On this page

Search results