protected function parseAuthorizationString($authorizationString)
    {
        if (strpos($authorizationString, 'Basic') !== false) {
            $authorizationString = trim(substr($authorizationString, 6));
        }
    
        $decoded = base64_decode($authorizationString);
        $delimiterPos = strpos($decoded, ':');
    
        return array(
            'publicKey' => substr($decoded, 0, $delimiterPos),
            'hmac' => substr($decoded, $delimiterPos + 1)
        );
    }