Gets the JSON string with the whitespace removed.
Access
public
Returns
Type |
Description |
|---|---|
|
The Base64-encoded, signed JSON string. |
Examples
Create a policy and get the policy signature.
// Instantiate S3
$s3 = new AmazonS3();
// Create a new S3 policy using an associative array
$policy = new s3Policy($s3, array(
'Version' => '2008-10-17',
'Statement' => array(
array( // Statement #1
'Sid' => 'AddPerm',
'Effect' => 'Allow',
'Principal' => array(
'AWS' => '*'
),
'Action' => array('s3:ReadObject'),
'Resource' => array('arn:aws:s3:::my-bucket/*')
)
)
));
// Success?
var_dump($policy->get_policy_signature());
Result:
string(56) "OWU3NzU4MGMxZmY5NDM0YmI1Mjk0Y2FkMWIzZWFjMDFiYzdkMjdlMg=="
Related Methods
Source
Method defined in utilities/policy.class.php | Toggle source view (4 lines) | View on GitHub

