5#include "authenticationuser.h"
7#include "authenticationrealm.h"
13using namespace Qt::StringLiterals;
30 return m_data.value(u
"id"_s);
35 m_data.insert(u
"id"_s,
id);
40 return m_data.isEmpty();
45 return m_data.value(u
"authRealm"_s).toString();
61 return realm->
checkPassword(c, *
this, password, passwordField);
80 const QVariantMap map = user.
data();
82 dbg.
nospace() <<
"AuthenticationUser(";
83 for (
const auto &[key, value] : map.asKeyValueRange()) {
84 dbg <<
'(' << key <<
", " << value <<
')';
91#include "moc_authenticationuser.cpp"
Combines user store and credential validation into a named realm.
bool checkPassword(Context *c, const AuthenticationUser &user, const QString &password, const QString &passwordField=QStringLiteral("password"))
Container for user data retrieved from an AuthenticationStore.
bool checkPassword(Context *c, AuthenticationRealm *realm, const QString &password, const QString &passwordField=QStringLiteral("password"))
void setData(const QVariantMap &data)
void setAuthRealm(const QString &authRealm)
void setId(const QVariant &id)
virtual ~AuthenticationUser()
The Cutelyst namespace holds all public Cutelyst API.
bool autoInsertSpaces() const const
void setAutoInsertSpaces(bool b)