cutelyst 4.3.0
A C++ Web Framework built on top of Qt, using the simple approach of Catalyst (Perl) framework.
authenticationstore.h
1/*
2 * SPDX-FileCopyrightText: (C) 2013-2023 Daniel Nicoletti <dantti12@gmail.com>
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5#pragma once
6
7#include <Cutelyst/Plugins/Authentication/authentication.h>
8#include <Cutelyst/cutelyst_global.h>
9
10namespace Cutelyst {
11
22class CUTELYST_PLUGIN_AUTHENTICATION_EXPORT AuthenticationStore
23{
24public:
29
33 virtual ~AuthenticationStore();
34
35public:
39 virtual bool canAutoCreateUser() const;
40
45 virtual AuthenticationUser autoCreateUser(Context *c, const ParamsMultiMap &userinfo) const;
46
51 [[nodiscard]] virtual bool canAutoUpdateUser() const;
52
57 virtual AuthenticationUser autoUpdateUser(Context *c, const ParamsMultiMap &userinfo) const;
58
62 [[nodiscard]] virtual AuthenticationUser findUser(Context *c,
63 const ParamsMultiMap &userinfo) = 0;
64
72 virtual QVariant forSession(Context *c, const AuthenticationUser &user);
73
81 [[nodiscard]] virtual AuthenticationUser fromSession(Context *c, const QVariant &frozenUser);
82};
83
84} // namespace Cutelyst
Abstract class to retrieve user data from a store.
virtual AuthenticationUser findUser(Context *c, const ParamsMultiMap &userinfo)=0
Container for user data retrieved from an AuthenticationStore.
The Cutelyst Context.
Definition context.h:42
The Cutelyst namespace holds all public Cutelyst API.