SDK for PHP V3

DpopSignature
in package

FinalYes

Table of Contents

Constants

ALLOW_LISTED_SERVICES  = ['signin' => true]

Methods

__construct()  : mixed
Creates a new DpopSignature instance for the specified service
signRequest()  : RequestInterface
Signs an HTTP request with a DPoP header

Constants

ALLOW_LISTED_SERVICES

public mixed ALLOW_LISTED_SERVICES = ['signin' => true]

Methods

__construct()

Creates a new DpopSignature instance for the specified service

public __construct(string $serviceName) : mixed
Parameters
$serviceName : string

The name of the AWS service (must be in the allow list)

Tags
throws
RuntimeException

If the OpenSSL extension is not loaded

throws
InvalidArgumentException

If the service is not in the allow list

signRequest()

Signs an HTTP request with a DPoP header

public signRequest(RequestInterface $request, OpenSSLAsymmetricKey $key) : RequestInterface
Parameters
$request : RequestInterface

The HTTP request to sign

$key : OpenSSLAsymmetricKey

The private key for signing

Tags
throws
RuntimeException|Exception

If signature generation fails

Return values
RequestInterface

The request with the DPoP header added

<-- modeled_exceptions -->
On this page