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

Minimal in memory authentication data store. More...

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

Inheritance diagram for Cutelyst::StoreMinimal:

Public Member Functions

 StoreMinimal (const QString &idField)
 
virtual ~StoreMinimal () override
 
void addUser (const AuthenticationUser &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 directly in memory. So it is gone when the application stops or restarts.

Definition at line 23 of file minimal.h.

Constructor & Destructor Documentation

◆ StoreMinimal()

StoreMinimal::StoreMinimal ( const QString idField)
explicit

Constructs a new StoreMinimal object with the given idField.

Definition at line 11 of file minimal.cpp.

◆ ~StoreMinimal()

StoreMinimal::~StoreMinimal ( )
overridevirtual

Destroys the StoreMinimal object.

Definition at line 16 of file minimal.cpp.

Member Function Documentation

◆ addUser()

void StoreMinimal::addUser ( const AuthenticationUser user)

Appends the user to internal memory storage

Definition at line 20 of file minimal.cpp.

◆ findUser()

AuthenticationUser StoreMinimal::findUser ( Context c,
const ParamsMultiMap userInfo 
)
finaloverridevirtual

Reimplemented from AuthenticationStore::findUser().

Implements Cutelyst::AuthenticationStore.

Definition at line 25 of file minimal.cpp.

References QMultiMap::value().

Referenced by fromSession().

◆ forSession()

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

Reimplemented from AuthenticationStore::forSession().

Reimplemented from Cutelyst::AuthenticationStore.

Definition at line 42 of file minimal.cpp.

References Cutelyst::AuthenticationUser::id().

◆ fromSession()

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

Reimplemented from AuthenticationStore::fromSession().

Reimplemented from Cutelyst::AuthenticationStore.

Definition at line 48 of file minimal.cpp.

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