REDAC HybridController
Firmware for LUCIDAC/REDAC Teensy
Loading...
Searching...
No Matches
net::auth::Gatekeeper Struct Reference

Actually carries out login. More...

#include <auth.h>

Inheritance diagram for net::auth::Gatekeeper:
Collaboration diagram for net::auth::Gatekeeper:

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
 
- Public Member Functions inherited from nvmconfig::PersistentSettings
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 Public Member Functions inherited from utils::HeapSingleton< Gatekeeper >
static Gatekeeper & get ()
 

Detailed Description

Actually carries out login.

Keeps track of device locking and failed logins. Owner of the UserPasswordAuthentification

Definition at line 180 of file auth.h.

Member Function Documentation

◆ fromJson()

void net::auth::Gatekeeper::fromJson ( JsonObjectConst src,
nvmconfig::Context c = nvmconfig::Context::Flash )
inlineoverridevirtual

◆ 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 )

◆ login()

FLASHMEM int net::auth::Gatekeeper::login ( JsonObjectConst msg_in,
JsonObject & msg_out,
AuthentificationContext & user_context )

◆ name()

std::string net::auth::Gatekeeper::name ( ) const
inlinevirtual

Implements nvmconfig::PersistentSettings.

Definition at line 200 of file auth.h.

◆ reset_defaults()

FLASHMEM void net::auth::Gatekeeper::reset_defaults ( )
overridevirtual

◆ toJson()

void net::auth::Gatekeeper::toJson ( JsonObject target,
nvmconfig::Context c = nvmconfig::Context::Flash ) const
inlineoverridevirtual

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

FailToBan net::auth::Gatekeeper::ban

Definition at line 189 of file auth.h.

◆ 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

Definition at line 188 of file auth.h.

◆ 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: