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,
115 [[nodiscard]]
static bool
161 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 userExists(Context *c)
static bool authenticate(Context *c, const ParamsMultiMap &userinfo, QStringView realm=defaultRealm)
virtual bool setup(Application *app) override
static void logout(Context *c)
std::shared_ptr< AuthenticationRealm > realm(QStringView name=defaultRealm) const
Authentication(Application *parent)
static AuthenticationUser user(Context *c)
static const QStringView defaultRealm
static bool userInRealm(Context *c, QStringView realmName=defaultRealm)
static AuthenticationUser findUser(Context *c, const ParamsMultiMap &userinfo, QStringView realm=defaultRealm)
Plugin(Application *parent)
QMultiMap< QString, QString > ParamsMultiMap
The Cutelyst namespace holds all public Cutelyst API.
QObject * parent() const const