cutelyst  4.5.1
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 
9 namespace Cutelyst {
10 
21 class CUTELYST_PLUGIN_AUTHENTICATION_EXPORT AuthenticationStore
22 {
23 public:
28 
32  virtual ~AuthenticationStore();
33 
34 public:
38  virtual bool canAutoCreateUser() const;
39 
44  virtual AuthenticationUser autoCreateUser(Context *c, const ParamsMultiMap &userinfo) const;
45 
50  [[nodiscard]] virtual bool canAutoUpdateUser() const;
51 
56  virtual AuthenticationUser autoUpdateUser(Context *c, const ParamsMultiMap &userinfo) const;
57 
61  [[nodiscard]] virtual AuthenticationUser findUser(Context *c,
62  const ParamsMultiMap &userinfo) = 0;
63 
71  virtual QVariant forSession(Context *c, const AuthenticationUser &user);
72 
80  [[nodiscard]] virtual AuthenticationUser fromSession(Context *c, const QVariant &frozenUser);
81 };
82 
83 } // 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.