protected static function getSuppliedCSRF()
    {
        $headers = function_exists('getallheaders') === true ? getallheaders() : [];

        $requestArguments = [];
        parse_str(file_get_contents('php://input'), $requestArguments);
        $requestArguments = array_merge($_POST, $requestArguments);

        if (array_key_exists(static::CSRF_TOKEN_HEADER, $headers) === true) {
            return $headers[static::CSRF_TOKEN_HEADER];
        } elseif (array_key_exists("csrf_token", $requestArguments) === true) {
            return $requestArguments['csrf_token'];
        } else {
            return null;
        }
    }