src/Qcloud/Cos/TokenListener.php
public function onRequestBeforeSend(Event $event) {
        if ($this->token != null) {
            $event['request']->setHeader('x-cos-security-token', $this->token);
        }
/*
        if(!$this->credentials instanceof NullCredentials) {
            $this->signature->signRequest($event['request'], $this->credentials);
        }
*/
    }
public function onRequestBeforeSend(Event $event) {
        if ($this->token != null) {
            $event['request']->setHeader('x-cos-security-token', $this->token);
        }
/*
        if(!$this->credentials instanceof NullCredentials) {
            $this->signature->signRequest($event['request'], $this->credentials);
        }
*/
    }
public function onRequestBeforeSend ( Event $ event ) { if ( $ this -> token != null ) { $ event [ 'request' ] -> setHeader ( 'x-cos-security-token' , $ this -> token ) ; } /*
        if(!$this->credentials instanceof NullCredentials) {
            $this->signature->signRequest($event['request'], $this->credentials);
        }
*/ }
Signs requests before they are sent

@param Event $event Event emitted
Signs requests before they are sent