19 #ifndef CSRFPROTECTION_H
20 #define CSRFPROTECTION_H
22 #include <Cutelyst/cutelyst_global.h>
23 #include <Cutelyst/Plugin>
28 class CSRFProtectionPrivate;
247 void setDefaultDetachTo(
const QString &actionNameOrPath);
253 void setFormFieldName(
const QString &fieldName);
258 void setErrorMsgStashKey(
const QString &keyName);
265 void setIgnoredNamespaces(
const QStringList &namespaces);
274 void setUseSessions(
bool useSessions);
290 void setCookieHttpOnly(
bool httpOnly);
296 void setCookieName(
const QString &cookieName);
302 void setHeaderName(
const QString &headerName);
310 void setGenericErrorMessage(
const QString &message);
317 void setGenericErrorContentTyp(
const QString &type);
322 static QByteArray getToken(
Context *c);
333 static QString getTokenFormField(
Context *c);
341 static bool checkPassed(
Context *c);
344 CSRFProtectionPrivate *d_ptr;
351 #endif // CSRFPROTECTION_H