20 #include <cutelee/exception.h>
21 #include <cutelee/parser.h>
23 #include <Cutelyst/Context>
24 #include <Cutelyst/ParamsMultiMap>
25 #include <Cutelyst/Request>
26 #include <Cutelyst/Response>
28 #ifdef PLUGIN_CSRFPROTECTION_ENABLED
29 #include <Cutelyst/Plugins/CSRFProtection/CSRFProtection>
32 Cutelee::Node *CSRFTag::getNode(
const QString &tagContent, Cutelee::Parser *p)
const
38 CSRF::CSRF(Cutelee::Parser *parser) : Cutelee::Node(parser)
42 void CSRF::render(Cutelee::OutputStream *stream, Cutelee::Context *gc)
const
44 #ifdef PLUGIN_CSRFPROTECTION_ENABLED
48 const QVariantHash hash = gc->stackHash(0);
49 auto it = hash.constBegin();
50 while (it != hash.constEnd()) {
51 if (it.value().userType() == qMetaTypeId<Cutelyst::Context *>()) {
54 m_cutelystContext = it.key();
70 qWarning("%s", "The CSRF protection plugin has not been built.");
74 #include "moc_csrf.cpp"
static QString getTokenFormField(Context *c)