cutelyst 3.9.1
A C++ Web Framework built on top of Qt, using the simple approach of Catalyst (Perl) framework.
csrf.h
1/*
2 * SPDX-FileCopyrightText: (C) 2017-2022 Matthias Fehring <mf@huessenbergnetz.de>
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5#ifndef CSRF_H
6#define CSRF_H
7
8#ifndef DOXYGEN_SHOULD_SKIP_THIS
9
10# include <grantlee/filter.h>
11# include <grantlee/node.h>
12# include <grantlee/safestring.h>
13# include <grantlee/util.h>
14
15class CSRFTag final : public Grantlee::AbstractNodeFactory
16{
17 Q_OBJECT
18public:
19 Grantlee::Node *getNode(const QString &tagContent, Grantlee::Parser *p) const override;
20};
21
22class CSRF final : public Grantlee::Node
23{
24 Q_OBJECT
25public:
26 explicit CSRF(Grantlee::Parser *parser = nullptr);
27
28 void render(Grantlee::OutputStream *stream, Grantlee::Context *gc) const override;
29
30private:
31 mutable QString m_cutelystContext = QStringLiteral("c");
32};
33
34#endif // DOXYGEN_SHOULD_SKIP_THIS
35
36#endif // CSRF_H