cutelyst  4.5.1
A C++ Web Framework built on top of Qt, using the simple approach of Catalyst (Perl) framework.
Cutelyst::StoreHtpasswd Class Reference

Authentication data store using a flat file. More...

#include <Cutelyst/Plugins/Authentication/htpasswd.h>

Inheritance diagram for Cutelyst::StoreHtpasswd:

Public Member Functions

 StoreHtpasswd (const QString &name)
 
virtual ~StoreHtpasswd () override
 
void addUser (const ParamsMultiMap &user)
 
AuthenticationUser findUser (Context *c, const ParamsMultiMap &userInfo) override final
 
QVariant forSession (Context *c, const AuthenticationUser &user) override final
 
AuthenticationUser fromSession (Context *c, const QVariant &frozenUser) override final
 
- Public Member Functions inherited from Cutelyst::AuthenticationStore
 AuthenticationStore ()
 
virtual ~AuthenticationStore ()
 
virtual AuthenticationUser autoCreateUser (Context *c, const ParamsMultiMap &userinfo) const
 
virtual AuthenticationUser autoUpdateUser (Context *c, const ParamsMultiMap &userinfo) const
 
virtual bool canAutoCreateUser () const
 
virtual bool canAutoUpdateUser () const
 

Detailed Description

This authentication data store stores user data as a combination of username:password in a flat file where each row contains one user. This is like the file created by Apache’s htpasswd command.

Definition at line 20 of file htpasswd.h.

Constructor & Destructor Documentation

◆ StoreHtpasswd()

StoreHtpasswd::StoreHtpasswd ( const QString name)

Constructs a new StoreHtpasswd object with the given file name.

Definition at line 17 of file htpasswd.cpp.

◆ ~StoreHtpasswd()

StoreHtpasswd::~StoreHtpasswd ( )
overridevirtual

Destroys the StoreHtpasswd object.

Definition at line 22 of file htpasswd.cpp.

Member Function Documentation

◆ addUser()

◆ findUser()

◆ forSession()

QVariant StoreHtpasswd::forSession ( Context c,
const AuthenticationUser user 
)
finaloverridevirtual

Reimplemented from AuthenticationStore::forSession().

Reimplemented from Cutelyst::AuthenticationStore.

Definition at line 95 of file htpasswd.cpp.

References Cutelyst::AuthenticationUser::id().

◆ fromSession()

AuthenticationUser StoreHtpasswd::fromSession ( Context c,
const QVariant frozenUser 
)
finaloverridevirtual

Reimplemented from AuthenticationStore::fromSession().

Reimplemented from Cutelyst::AuthenticationStore.

Definition at line 101 of file htpasswd.cpp.

References findUser(), and QVariant::toString().