feisty meow concerns codebase  2.140
octopi::entity_registry Class Referenceabstract

Provides a security model for the octopus. More...

#include <entity_registry.h>

Inheritance diagram for octopi::entity_registry:

Public Member Functions

 entity_registry ()
 
virtual ~entity_registry ()
 
virtual bool authorized (const octopus_entity &entity)=0
 returns true if the "entity" is a registered entity. More...
 
virtual bool locate_entity (const octopus_entity &entity, timely::time_stamp &last_active, basis::byte_array &verification)=0
 retrieves the security records for the "entity", if any exist. More...
 
virtual bool add_entity (const octopus_entity &entity, const basis::byte_array &verification)=0
 adds the "entity" to the list of authorized users if allowed. More...
 
virtual bool refresh_entity (const octopus_entity &entity)=0
 this should be used to refresh the entity's health record. More...
 
virtual bool zap_entity (const octopus_entity &entity)=0
 removes a "entity" if the entity can be found. More...
 
virtual basis::astring text_form ()=0
 prints out the contents of the entity registry. More...
 

Detailed Description

Provides a security model for the octopus.

Derived versions of this class can be hooked to an octopus to enforce a particular security model.

Definition at line 35 of file entity_registry.h.

Constructor & Destructor Documentation

◆ entity_registry()

octopi::entity_registry::entity_registry ( )

Definition at line 28 of file entity_registry.cpp.

◆ ~entity_registry()

octopi::entity_registry::~entity_registry ( )
virtual

Definition at line 34 of file entity_registry.cpp.

References basis::WHACK().

Member Function Documentation

◆ add_entity()

virtual bool octopi::entity_registry::add_entity ( const octopus_entity entity,
const basis::byte_array verification 
)
pure virtual

adds the "entity" to the list of authorized users if allowed.

note that this will still succeed if the entity is already present. the "verification" is used by the entity to prove its case for admittance, but if it has zero length, it's ignored. true is returned if the entity was allowed to login or refresh its record. false is returned if the entity was denied, possibly because of a bad or missing verification token.

Implemented in octopi::simple_entity_registry, and cromp::cromp_security.

Referenced by octopi::login_tentacle::consume().

◆ authorized()

virtual bool octopi::entity_registry::authorized ( const octopus_entity entity)
pure virtual

returns true if the "entity" is a registered entity.

this indicates that the entity is authorized to use this octopus' services.

Implemented in octopi::simple_entity_registry.

Referenced by octopi::login_tentacle::consume().

◆ locate_entity()

virtual bool octopi::entity_registry::locate_entity ( const octopus_entity entity,
timely::time_stamp last_active,
basis::byte_array verification 
)
pure virtual

retrieves the security records for the "entity", if any exist.

true is returned on success and "last_active" is set to the entity's last time of activity and "verification" is set to the cilent's verification token from its login.

Implemented in octopi::simple_entity_registry, and octopi::blank_entity_registry.

◆ refresh_entity()

virtual bool octopi::entity_registry::refresh_entity ( const octopus_entity entity)
pure virtual

this should be used to refresh the entity's health record.

it indicates that this entity is still functioning and should not be removed due to inactivity.

Implemented in octopi::simple_entity_registry.

◆ text_form()

virtual basis::astring octopi::entity_registry::text_form ( )
pure virtual

prints out the contents of the entity registry.

Implemented in octopi::simple_entity_registry, and octopi::blank_entity_registry.

◆ zap_entity()

virtual bool octopi::entity_registry::zap_entity ( const octopus_entity entity)
pure virtual

removes a "entity" if the entity can be found.

true is returned if that "entity" existed.

Implemented in octopi::simple_entity_registry.

Referenced by octopi::login_tentacle::consume(), and octopi::login_tentacle::expunge().


The documentation for this class was generated from the following files: