\qcloudcosAuth

Auth class for creating reusable or nonreusable signature.

Summary

Methods
Properties
Constants
createReusableSignature()
createNonreusableSignature()
No public properties found
AUTH_SECRET_ID_KEY_ERROR
No protected methods found
No protected properties found
N/A
createSignature()
No private properties found
N/A

Constants

AUTH_SECRET_ID_KEY_ERROR

AUTH_SECRET_ID_KEY_ERROR = -1

Methods

createReusableSignature()

createReusableSignature(  $expiration,   $bucket,   $filepath = null) 

Create reusable signature for listDirectory in $bucket or uploadFile into $bucket.

If $filepath is not null, this signature will be binded with this $filepath. This signature will expire at $expiration timestamp. Return the signature on success. Return error code if parameter is not valid.

Parameters

$expiration
$bucket
$filepath

createNonreusableSignature()

createNonreusableSignature(  $bucket,   $filepath) 

Create nonreusable signature for delete $filepath in $bucket.

This signature will expire after single usage. Return the signature on success. Return error code if parameter is not valid.

Parameters

$bucket
$filepath

createSignature()

createSignature(  $appId,   $secretId,   $secretKey,   $expiration,   $bucket,   $fileId) 

A helper function for creating signature.

Return the signature on success. Return error code if parameter is not valid.

Parameters

$appId
$secretId
$secretKey
$expiration
$bucket
$fileId