public function getUploadResult($token)
    {
        $jwt = new Jwt();

        $claims = $jwt->decode($token, false);

        if (!isset($claims['scope'])) {
            throw new AuthenticationException('scope is not exists');
        }

        if ($claims['scope'] !== 'bos.object.create.response') {
            throw new AuthenticationException(['`:scope` scope is not valid', 'scope' => $claims['scope']]);
        }

        if (!isset($claims['bucket'])) {
            throw new AuthenticationException('bucket is not exists');
        }

        $bucket = $claims['bucket'];

        $this->logger->info($token, 'bosClient.getUploadResult');

        $jwt->verify($token, is_string($this->_access_key) ? $this->_access_key : $this->_access_key[$bucket]);

        return array_except($claims, ['scope', 'iat', 'exp']);
    }
public function getUploadResult($token)
    {
        $jwt = new Jwt();

        $claims = $jwt->decode($token, false);

        if (!isset($claims['scope'])) {
            throw new AuthenticationException('scope is not exists');
        }

        if ($claims['scope'] !== 'bos.object.create.response') {
            throw new AuthenticationException(['`:scope` scope is not valid', 'scope' => $claims['scope']]);
        }

        if (!isset($claims['bucket'])) {
            throw new AuthenticationException('bucket is not exists');
        }

        $bucket = $claims['bucket'];

        $this->logger->info($token, 'bosClient.getUploadResult');

        $jwt->verify($token, is_string($this->_access_key) ? $this->_access_key : $this->_access_key[$bucket]);

        return array_except($claims, ['scope', 'iat', 'exp']);
    }
public function getUploadResult ( $ token ) { $ jwt = new Jwt ( ) ; $ claims = $ jwt -> decode ( $ token , false ) ; if ( ! isset ( $ claims [ 'scope' ] ) ) { throw new AuthenticationException ( 'scope is not exists' ) ; } if ( $ claims [ 'scope' ] !== 'bos.object.create.response' ) { throw new AuthenticationException ( [ '`:scope` scope is not valid' , 'scope' => $ claims [ 'scope' ] ] ) ; } if ( ! isset ( $ claims [ 'bucket' ] ) ) { throw new AuthenticationException ( 'bucket is not exists' ) ; } $ bucket = $ claims [ 'bucket' ] ; $ this -> logger -> info ( $ token , 'bosClient.getUploadResult' ) ; $ jwt -> verify ( $ token , is_string ( $ this -> _access_key ) ? $ this -> _access_key : $ this -> _access_key [ $ bucket ] ) ; return array_except ( $ claims , [ 'scope' , 'iat' , 'exp' ] ) ; }
verify token of create object response

@param string $token

@return array
verify token of create object response