cutelyst
4.5.1
A C++ Web Framework built on top of Qt, using the simple approach of Catalyst (Perl) framework.
|
Abstract class to retrieve user data from a store. More...
#include <Cutelyst/Plugins/Authentication/authenticationstore.h>
Public Member Functions | |
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 |
virtual AuthenticationUser | findUser (Context *c, const ParamsMultiMap &userinfo)=0 |
virtual QVariant | forSession (Context *c, const AuthenticationUser &user) |
virtual AuthenticationUser | fromSession (Context *c, const QVariant &frozenUser) |
Use this class to create your own user store. Reimplement the pure virtual function findUser() to retrieve user data from a storage like a file or a database.
For an example implementation see Authentication overview.
Definition at line 21 of file authenticationstore.h.
AuthenticationStore::AuthenticationStore | ( | ) |
Constructs a new AuthenticationStore object.
Definition at line 11 of file authenticationstore.cpp.
|
virtual |
Destroys the AuthenticationStore object.
Definition at line 15 of file authenticationstore.cpp.
|
virtual |
Reimplement this if your store supports automatic user creation.
Definition at line 24 of file authenticationstore.cpp.
|
virtual |
Reimplement this if your store supports automatic user update.
Definition at line 37 of file authenticationstore.cpp.
|
virtual |
Reimplement this if your store supports automatic user creation.
Definition at line 19 of file authenticationstore.cpp.
|
virtual |
Reimplement this if your store supports automatic user update.
Definition at line 32 of file authenticationstore.cpp.
|
pure virtual |
Retrieve the user that matches the userinfo.
Implemented in Cutelyst::StoreMinimal, and Cutelyst::StoreHtpasswd.
|
virtual |
Reimplement this so that you return a serializable value that can be used to identify the user. The default implementation just returns the user.
Reimplemented in Cutelyst::StoreMinimal, and Cutelyst::StoreHtpasswd.
Definition at line 45 of file authenticationstore.cpp.
References QVariant::fromValue().
|
virtual |
Reimplement this so that you return a User that was stored in the session.
The default implementation just returns the user.
Reimplemented in Cutelyst::StoreMinimal, and Cutelyst::StoreHtpasswd.
Definition at line 51 of file authenticationstore.cpp.
References QVariant::value().