5#ifndef AUTHENTICATION_H
6#define AUTHENTICATION_H
8#include <Cutelyst/Plugins/Authentication/authenticationuser.h>
9#include <Cutelyst/Plugins/authentication_export.h>
10#include <Cutelyst/paramsmultimap.h>
11#include <Cutelyst/plugin.h>
58class AuthenticationPrivate;
103 void addRealm(std::shared_ptr<AuthenticationStore> store,
104 std::shared_ptr<AuthenticationCredential> credential,
110 [[nodiscard]] std::shared_ptr<AuthenticationRealm>
123 [[nodiscard]]
inline static bool
167 AuthenticationPrivate *d_ptr;
The Cutelyst application.
virtual AuthenticationUser authenticate(Context *c, AuthenticationRealm *realm, const ParamsMultiMap &authinfo)=0
AuthenticationCredential(QObject *parent=nullptr)
Combines user store and credential validation into a named realm.
Abstract class to retrieve user data from a store.
Container for user data retrieved from an AuthenticationStore.
void addRealm(std::shared_ptr< AuthenticationRealm > realm)
static bool userInRealm(Context *c, const QString &realmName=QLatin1String(defaultRealm))
std::shared_ptr< AuthenticationRealm > realm(const QString &name=QLatin1String(defaultRealm)) const
static bool userExists(Context *c)
virtual bool setup(Application *app) override
static void logout(Context *c)
static bool authenticate(Context *c, const ParamsMultiMap &userinfo, const QString &realm=QLatin1String(defaultRealm))
static char * defaultRealm
Authentication(Application *parent)
static AuthenticationUser user(Context *c)
static AuthenticationUser findUser(Context *c, const ParamsMultiMap &userinfo, const QString &realm=QLatin1String(defaultRealm))
Plugin(Application *parent)
QMultiMap< QString, QString > ParamsMultiMap
The Cutelyst namespace holds all public Cutelyst API.
QObject * parent() const const