6 #ifndef CSRFPROTECTION_H
7 #define CSRFPROTECTION_H
9 #include <Cutelyst/cutelyst_global.h>
10 #include <Cutelyst/Plugin>
15 class CSRFProtectionPrivate;
242 void setDefaultDetachTo(
const QString &actionNameOrPath);
248 void setFormFieldName(
const QString &fieldName);
253 void setErrorMsgStashKey(
const QString &keyName);
260 void setIgnoredNamespaces(
const QStringList &namespaces);
269 void setUseSessions(
bool useSessions);
285 void setCookieHttpOnly(
bool httpOnly);
291 void setCookieName(
const QString &cookieName);
297 void setHeaderName(
const QString &headerName);
305 void setGenericErrorMessage(
const QString &message);
312 void setGenericErrorContentTyp(
const QString &type);
317 static QByteArray getToken(
Context *c);
328 static QString getTokenFormField(
Context *c);
336 static bool checkPassed(
Context *c);
339 CSRFProtectionPrivate *d_ptr;
The Cutelyst Application.
Protect input forms against Cross Site Request Forgery (CSRF/XSRF) attacks.
The Cutelyst namespace holds all public Cutelyst API.