|
cutelyst 3.9.1
A C++ Web Framework built on top of Qt, using the simple approach of Catalyst (Perl) framework.
|

Public Member Functions | |
| Authentication (Application *parent) | |
| Constructs a new Authentication object with the given parent. | |
| void | addRealm (AuthenticationRealm *realm) |
Adds the realm with name. | |
| void | addRealm (AuthenticationStore *store, AuthenticationCredential *credential, const QString &name=QLatin1String(defaultRealm)) |
Creates a new AuthenticationRealm using store, credential and name to build it. | |
| AuthenticationRealm * | realm (const QString &name=QLatin1String(defaultRealm)) const |
Returns an AuthenticationRealm object that was registered with name. | |
Public Member Functions inherited from Cutelyst::Plugin | |
| Plugin (Application *parent) | |
Static Public Member Functions | |
| static bool | authenticate (Context *c, const ParamsMultiMap &userinfo, const QString &realm=QLatin1String(defaultRealm)) |
| static bool | authenticate (Context *c, const QString &realm=QLatin1String(defaultRealm)) |
| static AuthenticationUser | findUser (Context *c, const ParamsMultiMap &userinfo, const QString &realm=QLatin1String(defaultRealm)) |
Tries to find the user with userinfo using the realm, returning a non null AuthenticationUser on success. | |
| static void | logout (Context *c) |
| static AuthenticationUser | user (Context *c) |
| static bool | userExists (Context *c) |
| static bool | userInRealm (Context *c, const QString &realmName=QLatin1String(defaultRealm)) |
Static Public Attributes | |
| static char * | defaultRealm |
| default realm name | |
Protected Member Functions | |
| virtual bool | setup (Application *app) override |
Definition at line 37 of file authentication.h.
| Authentication::Authentication | ( | Application * | parent | ) |
Definition at line 29 of file authentication.cpp.
References Cutelyst::Plugin::Plugin().
Referenced by addRealm(), and realm().
|
overridevirtual |
Definition at line 39 of file authentication.cpp.
| void Authentication::addRealm | ( | Cutelyst::AuthenticationRealm * | realm | ) |
Definition at line 44 of file authentication.cpp.
References Authentication(), and realm().
Referenced by addRealm().
| void Cutelyst::Authentication::addRealm | ( | Cutelyst::AuthenticationStore * | store, |
| Cutelyst::AuthenticationCredential * | credential, | ||
| const QString & | name = QLatin1String(defaultRealm) ) |
Definition at line 52 of file authentication.cpp.
References addRealm().
|
static |
Returns true if the userinfo could be validated against a realm.
Definition at line 65 of file authentication.cpp.
References Cutelyst::AuthenticationRealm::authenticate(), realm(), and user().
Referenced by authenticate().
|
inlinestatic |
Returns true if the request information could be validated against a realm.
Definition at line 124 of file authentication.h.
References authenticate(), and realm().
|
static |
Definition at line 88 of file authentication.cpp.
References Cutelyst::AuthenticationRealm::findUser(), and realm().
|
static |
Logs the user out. Deletes the currently logged in user from the Context and the session. It does not delete the session.
Definition at line 158 of file authentication.cpp.
References realm().
| AuthenticationRealm * Authentication::realm | ( | const QString & | name = QLatin1String(defaultRealm) | ) | const |
Definition at line 59 of file authentication.cpp.
References Authentication().
Referenced by addRealm(), authenticate(), authenticate(), findUser(), logout(), and userInRealm().
|
overrideprotectedvirtual |
Reimplement this if you need to connect to the signals emitted from Cutelyst::Application
Reimplemented from Cutelyst::Plugin.
Definition at line 173 of file authentication.cpp.
References Cutelyst::Application::postForked().
|
static |
Returns the authenticated user if any, if you only need to know if the user is authenticated (rather than retrieving it's ID) use userExists instead which is faster.
Definition at line 108 of file authentication.cpp.
References Cutelyst::Context::stash(), and user().
Referenced by authenticate(), Cutelyst::RoleACL::canVisit(), user(), and userInRealm().
|
static |
Returns true if a user is logged in right now. The difference between userExists() and user() is that userExists will return true if a user is logged in, even if it has not been yet retrieved from the storage backend. If you only need to know if the user is logged in, depending on the storage mechanism this can be much more efficient. userExists() only looks into the session while user() is trying to restore the user.
Definition at line 120 of file authentication.cpp.
References Cutelyst::Context::stash().
|
static |
Works like user_exists, except that it only returns true if a user is both logged in right now and was retrieved from the realm provided.
Definition at line 137 of file authentication.cpp.
References realm(), Cutelyst::Context::stash(), and user().
|
static |
Definition at line 43 of file authentication.h.