5#ifndef AUTHENTICATIONREALM_H
6#define AUTHENTICATIONREALM_H
8#include <Cutelyst/Plugins/Authentication/authenticationuser.h>
9#include <Cutelyst/component.h>
43 std::shared_ptr<AuthenticationCredential>
credential,
45 QObject *parent =
nullptr);
51 [[nodiscard]] std::shared_ptr<AuthenticationStore>
store() const noexcept;
100 const QString &password,
101 const QString &passwordField = QStringLiteral(
"password"));
104 friend class Authentication;
105 friend class AuthenticationPrivate;
Abstract class to validate authentication credentials like user name and password.
std::shared_ptr< AuthenticationCredential > credential() const noexcept
std::shared_ptr< AuthenticationStore > store() const noexcept
static const QStringView defaultRealm
bool checkPassword(Context *c, const AuthenticationUser &user, const QString &password, const QString &passwordField=QStringLiteral("password"))
void removePersistedUser(Context *c)
virtual AuthenticationUser authenticate(Context *c, const ParamsMultiMap &authinfo)
AuthenticationRealm(std::shared_ptr< AuthenticationStore > store, std::shared_ptr< AuthenticationCredential > credential, QStringView name=defaultRealm, QObject *parent=nullptr)
QVariant userIsRestorable(Context *c)
AuthenticationUser persistUser(Context *c, const AuthenticationUser &user)
virtual AuthenticationUser findUser(Context *c, const ParamsMultiMap &userinfo)
AuthenticationUser restoreUser(Context *c, const QVariant &frozenUser)
Abstract class to retrieve user data from a store.
Container for user data retrieved from an AuthenticationStore.
Component(QObject *parent=nullptr)
QString name() const noexcept
QMultiMap< QString, QString > ParamsMultiMap
The Cutelyst namespace holds all public Cutelyst API.