CookieSigner
in package
Table of Contents
Methods
- __construct() : mixed
- getSignedCookie() : array<string|int, mixed>
- Create a signed Amazon CloudFront Cookie.
Methods
__construct()
public
__construct( $keyPairId, $privateKey) : mixed
Parameters
- $keyPairId :
-
string ID of the key pair
- $privateKey :
-
string Path to the private key used for signing
Tags
getSignedCookie()
Create a signed Amazon CloudFront Cookie.
public
getSignedCookie([string $url = null ][, string|int|null $expires = null ][, string $policy = null ]) : array<string|int, mixed>
Parameters
- $url : string = null
-
URL to sign (can include query string and wildcards). Not required when passing a custom $policy.
- $expires : string|int|null = null
-
UTC Unix timestamp used when signing with a canned policy. Not required when passing a custom $policy.
- $policy : string = null
-
JSON policy. Use this option when creating a signed cookie for a custom policy.
Tags
Return values
array<string|int, mixed> —The authenticated cookie parameters