5#ifndef AUTHENTICATION_H
6#define AUTHENTICATION_H
8#include <Cutelyst/Plugins/Authentication/authenticationuser.h>
9#include <Cutelyst/cutelyst_global.h>
10#include <Cutelyst/paramsmultimap.h>
11#include <Cutelyst/plugin.h>
16class AuthenticationStore;
17class AuthenticationRealm;
58class AuthenticationPrivate;
98 void addRealm(std::shared_ptr<AuthenticationRealm> realm);
103 void addRealm(std::shared_ptr<AuthenticationStore> store,
104 std::shared_ptr<AuthenticationCredential> credential,
110 [[nodiscard]] std::shared_ptr<AuthenticationRealm>
116 [[nodiscard]]
static bool authenticate(
Context *c,
123 [[nodiscard]]
inline static bool
149 [[nodiscard]]
static bool userExists(
Context *c);
155 [[nodiscard]]
static bool userInRealm(
Context *c,
162 static void logout(
Context *c);
167 AuthenticationPrivate *d_ptr;
The Cutelyst application.
Abstract class to validate authentication credentials like user name and password.
virtual AuthenticationUser authenticate(Context *c, AuthenticationRealm *realm, const ParamsMultiMap &authinfo)=0
Combines user store and credential validation into a named realm.
Container for user data retrieved from an AuthenticationStore.
Main class to manage user authentication.
std::shared_ptr< AuthenticationRealm > realm(const QString &name=QLatin1String(defaultRealm)) const
static bool authenticate(Context *c, const ParamsMultiMap &userinfo, const QString &realm=QLatin1String(defaultRealm))
static char * defaultRealm
Base class for Cutelyst Plugins.
QMultiMap< QString, QString > ParamsMultiMap
The Cutelyst namespace holds all public Cutelyst API.