cutelyst 4.3.0
A C++ Web Framework built on top of Qt, using the simple approach of Catalyst (Perl) framework.
minimal.h
1/*
2 * SPDX-FileCopyrightText: (C) 2013-2022 Daniel Nicoletti <dantti12@gmail.com>
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5#ifndef AUTHENTICATION_STORE_MINIMAL_H
6#define AUTHENTICATION_STORE_MINIMAL_H
7
8#include <Cutelyst/Plugins/Authentication/authenticationstore.h>
9#include <Cutelyst/cutelyst_global.h>
10
11#include <QVector>
12
13namespace Cutelyst {
14
23class CUTELYST_PLUGIN_AUTHENTICATION_EXPORT StoreMinimal : public AuthenticationStore
24{
25public:
29 explicit StoreMinimal(const QString &idField);
30
34 virtual ~StoreMinimal() override;
35
39 void addUser(const AuthenticationUser &user);
40
44 AuthenticationUser findUser(Context *c, const ParamsMultiMap &userInfo) override final;
45
49 QVariant forSession(Context *c, const AuthenticationUser &user) override final;
50
54 AuthenticationUser fromSession(Context *c, const QVariant &frozenUser) override final;
55
56private:
57 QString m_idField;
59};
60
61} // namespace Cutelyst
62
63#endif // AUTHENTICATION_STORE_MINIMAL_H
Abstract class to retrieve user data from a store.
Container for user data retrieved from an AuthenticationStore.
The Cutelyst Context.
Definition context.h:42
Minimal in memory authentication data store.
Definition minimal.h:24
The Cutelyst namespace holds all public Cutelyst API.