EndpointSignatureInterface
extends
SignatureInterface
in
Interface for signatures that use specific region and service names when signing requests.
Table of Contents
Methods
- createPresignedUrl() : string
- Create a pre-signed URL
- setRegionName() : self
- Set the region name instead of inferring it from a request URL
- setServiceName() : self
- Set the service name instead of inferring it from a request URL
- signRequest() : mixed
- Signs the specified request with an AWS signing protocol by using the provided AWS account credentials and adding the required headers to the request.
Methods
createPresignedUrl()
Create a pre-signed URL
public
createPresignedUrl(RequestInterface $request, CredentialsInterface $credentials, int|string|DateTime $expires) : string
Parameters
- $request : RequestInterface
-
Request to sign
- $credentials : CredentialsInterface
-
Credentials used to sign
- $expires : int|string|DateTime
-
The time at which the URL should expire. This can be a Unix timestamp, a PHP DateTime object, or a string that can be evaluated by strtotime
Return values
stringsetRegionName()
Set the region name instead of inferring it from a request URL
public
setRegionName(string $region) : self
Parameters
- $region : string
-
Name of the region used when signing
Return values
selfsetServiceName()
Set the service name instead of inferring it from a request URL
public
setServiceName(string $service) : self
Parameters
- $service : string
-
Name of the service used when signing
Return values
selfsignRequest()
Signs the specified request with an AWS signing protocol by using the provided AWS account credentials and adding the required headers to the request.
public
signRequest(RequestInterface $request, CredentialsInterface $credentials) : mixed
Parameters
- $request : RequestInterface
-
Request to add a signature to
- $credentials : CredentialsInterface
-
Signing credentials