public function appendAccessToken(Event $event) {
        $command = $event['command'];

        switch ($command->getName()) {
            case 'GetResourceGroup':
            case 'GetResourceGroups':
            case 'GetAccessControlRule':
            case 'GetAccessControlRules':
            case 'GetUserInfo':
            case 'GetImages':
            case 'GetImageProperties':
            case 'GetMetadata':
                $request = $command->getRequest();

                // Generate an access token
                $accessToken = $this->getAccessToken(urldecode($request->getUrl()), $request->getClient()->getConfig('privateKey'));

                // Add as query parameter
                $request->getQuery()->set('accessToken', $accessToken);
                break;
        }
    }