cutelyst
3.9.1
A C++ Web Framework built on top of Qt, using the simple approach of Catalyst (Perl) framework.
Cutelyst
Plugins
Authentication
authenticationrealm.h
1
/*
2
* SPDX-FileCopyrightText: (C) 2013-2022 Daniel Nicoletti <dantti12@gmail.com>
3
* SPDX-License-Identifier: BSD-3-Clause
4
*/
5
#ifndef AUTHENTICATIONREALM_H
6
#define AUTHENTICATIONREALM_H
7
8
#include <Cutelyst/Plugins/Authentication/authenticationuser.h>
9
#include <Cutelyst/component.h>
10
#include <Cutelyst/cutelyst_global.h>
11
12
namespace
Cutelyst
{
13
14
class
Context;
15
class
AuthenticationStore;
16
class
AuthenticationCredential;
17
class
CUTELYST_PLUGIN_AUTHENTICATION_EXPORT
AuthenticationRealm
:
public
Component
18
{
19
Q_OBJECT
20
public
:
22
static
char
*
defaultRealm
;
23
28
explicit
AuthenticationRealm
(
AuthenticationStore
*store,
29
AuthenticationCredential
*credential,
30
const
QString
&name =
QLatin1String
(defaultRealm),
31
QObject
*parent =
nullptr
);
32
virtual
~AuthenticationRealm
()
override
;
33
37
AuthenticationStore
*store()
const
;
38
42
AuthenticationCredential
*credential()
const
;
43
47
virtual
AuthenticationUser
findUser(
Context
*c,
const
ParamsMultiMap
&userinfo);
48
53
virtual
AuthenticationUser
authenticate(
Context
*c,
const
ParamsMultiMap
&authinfo);
54
58
void
removePersistedUser(
Context
*c);
59
63
AuthenticationUser
persistUser(
Context
*c,
const
AuthenticationUser
&user);
64
68
AuthenticationUser
restoreUser(
Context
*c,
const
QVariant
&frozenUser);
69
73
QVariant
userIsRestorable(
Context
*c);
74
75
private
:
76
friend
class
Authentication
;
77
friend
class
AuthenticationPrivate;
78
79
AuthenticationStore
*m_store;
80
AuthenticationCredential
*m_credential;
81
};
82
83
}
// namespace Cutelyst
84
85
#endif
// AUTHENTICATIONREALM_H
Cutelyst::AuthenticationCredential
Definition
authentication.h:19
Cutelyst::AuthenticationRealm
Definition
authenticationrealm.h:18
Cutelyst::AuthenticationRealm::defaultRealm
static char * defaultRealm
default realm name
Definition
authenticationrealm.h:22
Cutelyst::AuthenticationStore
Definition
authenticationstore.h:14
Cutelyst::AuthenticationUser
Definition
authenticationuser.h:19
Cutelyst::Authentication
Definition
authentication.h:38
Cutelyst::Component
The Cutelyst Component base class.
Definition
component.h:26
Cutelyst::Context
The Cutelyst Context.
Definition
context.h:39
Cutelyst
The Cutelyst namespace holds all public Cutelyst API.
Definition
Mainpage.dox:8
QLatin1String
QMultiMap
QObject
QString
QVariant
Generated on Mon Oct 6 2025 13:57:24 for cutelyst by
1.9.7