REDAC HybridController
Firmware for LUCIDAC/REDAC Teensy
|
Actually carries out login. More...
#include <auth.h>


Public Member Functions | |
int | login (JsonObjectConst msg_in, JsonObject &msg_out, AuthentificationContext &user_context) |
Carrys out an actual login. | |
int | lock_acquire (JsonObjectConst msg_in, JsonObject &msg_out, AuthentificationContext &user_context) |
int | lock_release (JsonObjectConst msg_in, JsonObject &msg_out, AuthentificationContext &user_context) |
std::string | name () const |
void | reset_defaults () override |
void | fromJson (JsonObjectConst src, nvmconfig::Context c=nvmconfig::Context::Flash) override |
void | toJson (JsonObject target, nvmconfig::Context c=nvmconfig::Context::Flash) const override |
![]() | |
virtual void | clear () |
Clear local memory in order to save RAM if an object is not needed during runtime but only at startup. | |
Public Attributes | |
bool | enable_auth |
Overall switch to enable/disable security hardness. | |
bool | enable_users |
Enable/disable login at all, i.e. the user-password authentification. | |
bool | enable_whitelist |
Enable/disable the IP Whitelist lookup. | |
UserPasswordAuthentification | users |
utils::IPMaskList | whitelist |
DeviceLock | lock |
FailToBan | ban |
std::string | access_control_allow_origin |
For webserver: CORS setting. | |
Additional Inherited Members | |
![]() | |
static Gatekeeper & | get () |
Detailed Description
Actually carries out login.
Keeps track of device locking and failed logins. Owner of the UserPasswordAuthentification
Member Function Documentation
◆ fromJson()
|
inlineoverridevirtual |
Implements nvmconfig::PersistentSettings.
Definition at line 204 of file auth.h.
References access_control_allow_origin, enable_auth, enable_users, enable_whitelist, JSON_GET, JSON_GET_AS, src, users, and whitelist.
◆ lock_acquire()
FLASHMEM int net::auth::Gatekeeper::lock_acquire | ( | JsonObjectConst | msg_in, |
JsonObject & | msg_out, | ||
AuthentificationContext & | user_context ) |
Definition at line 109 of file auth.cpp.
References net::auth::AuthentificationContext::user().
◆ lock_release()
FLASHMEM int net::auth::Gatekeeper::lock_release | ( | JsonObjectConst | msg_in, |
JsonObject & | msg_out, | ||
AuthentificationContext & | user_context ) |
Definition at line 121 of file auth.cpp.
References net::auth::AuthentificationContext::can_do(), net::auth::RequiresAdmin, and net::auth::AuthentificationContext::user().
◆ login()
FLASHMEM int net::auth::Gatekeeper::login | ( | JsonObjectConst | msg_in, |
JsonObject & | msg_out, | ||
AuthentificationContext & | user_context ) |
Carrys out an actual login.
Definition at line 67 of file auth.cpp.
References net::auth::AuthentificationContext::hasBetterClearenceThen(), LOG_ALWAYS, and net::auth::AuthentificationContext::login().
◆ name()
|
inlinevirtual |
Implements nvmconfig::PersistentSettings.
◆ reset_defaults()
|
overridevirtual |
Implements nvmconfig::PersistentSettings.
Definition at line 13 of file auth.cpp.
References access_control_allow_origin, enable_auth, enable_users, enable_whitelist, utils::IPMaskList::list, net::auth::UserPasswordAuthentification::reset_defaults(), users, and whitelist.
◆ toJson()
|
inlineoverridevirtual |
Implements nvmconfig::PersistentSettings.
Definition at line 213 of file auth.h.
References access_control_allow_origin, enable_auth, enable_users, enable_whitelist, JSON_SET, users, and whitelist.
Member Data Documentation
◆ access_control_allow_origin
std::string net::auth::Gatekeeper::access_control_allow_origin |
For webserver: CORS setting.
Definition at line 191 of file auth.h.
Referenced by fromJson(), reset_defaults(), and toJson().
◆ ban
◆ enable_auth
bool net::auth::Gatekeeper::enable_auth |
Overall switch to enable/disable security hardness.
Definition at line 181 of file auth.h.
Referenced by fromJson(), reset_defaults(), and toJson().
◆ enable_users
bool net::auth::Gatekeeper::enable_users |
Enable/disable login at all, i.e. the user-password authentification.
Definition at line 182 of file auth.h.
Referenced by fromJson(), reset_defaults(), and toJson().
◆ enable_whitelist
bool net::auth::Gatekeeper::enable_whitelist |
Enable/disable the IP Whitelist lookup.
Definition at line 183 of file auth.h.
Referenced by fromJson(), reset_defaults(), and toJson().
◆ lock
DeviceLock net::auth::Gatekeeper::lock |
◆ users
UserPasswordAuthentification net::auth::Gatekeeper::users |
Definition at line 185 of file auth.h.
Referenced by fromJson(), reset_defaults(), and toJson().
◆ whitelist
utils::IPMaskList net::auth::Gatekeeper::whitelist |
Definition at line 186 of file auth.h.
Referenced by fromJson(), reset_defaults(), and toJson().
The documentation for this struct was generated from the following files: