![]() |
cutelyst 5.0.1
A C++ Web Framework built on top of Qt, using the simple approach of Catalyst (Perl) framework.
|
Abstract class to validate authentication credentials like user name and password. More...
#include <Cutelyst/Plugins/Authentication/authentication.h>

Public Member Functions | |
| AuthenticationCredential (QObject *parent=nullptr) | |
| virtual | ~AuthenticationCredential () |
| virtual AuthenticationUser | authenticate (Context *c, AuthenticationRealm *realm, const ParamsMultiMap &authinfo)=0 |
Use this class to create your own credential validator. Reimplement the pure virtual function authenticate() in your derived class and set the object as credential to your AuthenticationRealm. See CredentialPassword for an example implementation.
Cutelyst already ships some implementations to verify optionally PBKDF2 derived passwords from user input and HTTP headers.
For an example implementation see Authentication overview.
Definition at line 33 of file authentication.h.
|
explicit |
Constructs a new AuthenticationCredential object with the given parent.
Definition at line 274 of file authentication.cpp.
Referenced by Cutelyst::CredentialHttp::CredentialHttp(), and Cutelyst::CredentialPassword::CredentialPassword().
|
virtual |
Destroys the AuthenticationCredential object.
Definition at line 279 of file authentication.cpp.
|
pure virtual |
Tries to authenticate the authinfo using the given realm. When reimplementing, get the credentials like user name and password provided by the user from the authinfo and find the user data in the authentication realm with AuthenticationRealm::findUser(). Than validate the user data and return a not null AuthenticationUser in case off success.
Implemented in Cutelyst::CredentialHttp, and Cutelyst::CredentialPassword.