feisty meow concerns codebase
2.140
|
Provides rudimentary login services. More...
#include <login_tentacle.h>
Public Member Functions | |
login_tentacle (entity_registry &security, int dormancy_period=7 *basis::MINUTE_ms) | |
constructs a login manager based on "security". More... | |
virtual | ~login_tentacle () |
DEFINE_CLASS_NAME ("login_tentacle") | |
virtual basis::outcome | reconstitute (const structures::string_array &classifier, basis::byte_array &packed_form, infoton *&reformed) |
recreates a "reformed" infoton from the packed data. More... | |
virtual basis::outcome | consume (infoton &to_chow, const octopus_request_id &item_id, basis::byte_array &transformed) |
the base login_tentacle allows anyone to log in. More... | |
virtual void | expunge (const octopus_entity &to_remove) |
trashes the records we were keeping for the entity. More... | |
Public Member Functions inherited from octopi::tentacle_helper< security_infoton > | |
tentacle_helper (const structures::string_array &classifier, bool backgrounded, int motivational_rate=tentacle::DEFAULT_RATE) | |
virtual | ~tentacle_helper () |
force a virtual destructor. More... | |
virtual basis::outcome | consume (infoton &formal(to_chow), const octopus_request_id &formal(item_id), basis::byte_array &transformed) |
consume is not really provided here. remember to implement for servers! More... | |
virtual void | expunge (const octopus_entity &formal(to_remove)) |
no general actions for expunge; they are all class-specific. More... | |
Public Member Functions inherited from octopi::tentacle | |
tentacle (const structures::string_array &group_name, bool backgrounded, int motivational_rate=tentacle::DEFAULT_RATE) | |
constructs a tentacle that handles infotons with the "group_name". More... | |
virtual | ~tentacle () |
DEFINE_CLASS_NAME ("tentacle") | |
const structures::string_array & | group () const |
returns the name of the group that this tentacle services. More... | |
bool | backgrounding () const |
reports on whether this tentacle supports background operation or not. More... | |
int | motivational_rate () const |
returns the background processing rate this was constructed with. More... | |
basis::outcome | enqueue (infoton *to_chow, const octopus_request_id &item_id) |
holds onto infotons coming from the octopus for backgrounding. More... | |
infoton * | next_request (octopus_request_id &item_id) |
pops out the next queued request for processing. More... | |
bool | store_product (infoton *product, const octopus_request_id &original_id) |
used by tentacles to store the objects they produce from infotons. More... | |
void | attach_storage (entity_data_bin &storage) |
used when a tentacle is being integrated with an octopus. More... | |
void | detach_storage () |
unhooks the storage bin from this tentacle. More... | |
entity_data_bin * | get_storage () |
returns the current pointer, which might be nil. More... | |
void | propel_arm () |
invoked by our thread to cause requests to be processed. More... | |
Additional Inherited Members | |
Public Types inherited from octopi::tentacle | |
enum | constants { DEFAULT_RATE = 40 } |
enum | outcomes { OKAY = basis::common::OKAY , NOT_FOUND = basis::common::NOT_FOUND , ALREADY_EXISTS = basis::common::EXISTING , BAD_INPUT = basis::common::BAD_INPUT , NO_SPACE = basis::common::NO_SPACE , GARBAGE = basis::common::GARBAGE , DISALLOWED = basis::common::DISALLOWED , NO_HANDLER = basis::common::NO_HANDLER , PARTIAL = basis::common::PARTIAL , ENCRYPTION_MISMATCH = basis::common::ENCRYPTION_MISMATCH } |
Static Public Member Functions inherited from octopi::tentacle | |
static const char * | outcome_name (const basis::outcome &to_name) |
returns the textual form of the outcome "to_name". More... | |
Provides rudimentary login services.
This is a way for entities to become logged into an octopus system, should that be required by the application.
Definition at line 34 of file login_tentacle.h.
octopi::login_tentacle::login_tentacle | ( | entity_registry & | security, |
int | dormancy_period = 7 * basis::MINUTE_ms |
||
) |
constructs a login manager based on "security".
this will allow an entity to persist for "dormancy_period" milliseconds without a refresh. after that time, the entities we haven't heard from are whacked. the "security" object will provide our login checking.
Definition at line 35 of file login_tentacle.cpp.
|
virtual |
Definition at line 42 of file login_tentacle.cpp.
|
virtual |
the base login_tentacle allows anyone to log in.
this permits any entity that tries to log in to become a verified entity. derived login_tentacles can force the entity to prove that it's worthy in an application specific manner.
Implements octopi::tentacle.
Definition at line 59 of file login_tentacle.cpp.
References octopi::octopus_request_id::_entity, octopi::security_infoton::_mode, octopi::security_infoton::_success, octopi::entity_registry::add_entity(), octopi::entity_registry::authorized(), octopi::tentacle::BAD_INPUT, octopi::security_infoton::clone(), octopi::tentacle::DISALLOWED, FUNCDEF, octopi::security_infoton::LI_LOGIN, octopi::security_infoton::LI_LOGOUT, octopi::security_infoton::LI_REFRESH, octopi::tentacle::NO_SPACE, octopi::tentacle::OKAY, octopi::tentacle::PARTIAL, basis::array< contents >::reset(), octopi::tentacle::store_product(), octopi::security_infoton::verification(), and octopi::entity_registry::zap_entity().
octopi::login_tentacle::DEFINE_CLASS_NAME | ( | "login_tentacle" | ) |
|
virtual |
trashes the records we were keeping for the entity.
Implements octopi::tentacle.
Definition at line 54 of file login_tentacle.cpp.
References octopi::entity_registry::zap_entity().
|
virtual |
recreates a "reformed" infoton from the packed data.
this uses the "classifier" and packed infoton data in "packed_form". this will only succeed if the classifier's first name is understood here.
Reimplemented from octopi::tentacle_helper< security_infoton >.
Definition at line 44 of file login_tentacle.cpp.
References octopi::tentacle::NO_HANDLER, NULL_POINTER, octopi::reconstituter(), and octopi::security_infoton::security_classifier().