cutelyst 4.3.0
A C++ Web Framework built on top of Qt, using the simple approach of Catalyst (Perl) framework.
htpasswd.h
1/*
2 * SPDX-FileCopyrightText: (C) 2014-2023 Daniel Nicoletti <dantti12@gmail.com>
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5#pragma once
6
7#include <Cutelyst/Plugins/Authentication/authenticationstore.h>
8#include <Cutelyst/cutelyst_global.h>
9
10namespace Cutelyst {
11
21class CUTELYST_PLUGIN_AUTHENTICATION_EXPORT StoreHtpasswd : public AuthenticationStore
22{
23public:
27 StoreHtpasswd(const QString &name);
28
32 virtual ~StoreHtpasswd() override;
33
37 void addUser(const ParamsMultiMap &user);
38
42 AuthenticationUser findUser(Context *c, const ParamsMultiMap &userInfo) override final;
43
47 QVariant forSession(Context *c, const AuthenticationUser &user) override final;
48
52 AuthenticationUser fromSession(Context *c, const QVariant &frozenUser) override final;
53
54private:
55 QString m_filename;
56};
57
58} // namespace Cutelyst
Abstract class to retrieve user data from a store.
Container for user data retrieved from an AuthenticationStore.
The Cutelyst Context.
Definition context.h:42
Authentication data store using a flat file.
Definition htpasswd.h:22
The Cutelyst namespace holds all public Cutelyst API.