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". | |
| 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. | |
| 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. | |
| virtual void | expunge (const octopus_entity &to_remove) |
| trashes the records we were keeping for the entity. | |
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.
| octopi::login_tentacle::~login_tentacle | ( | ) | [virtual] |
Definition at line 42 of file login_tentacle.cpp.
| outcome octopi::login_tentacle::consume | ( | infoton & | to_chow, | |
| const octopus_request_id & | item_id, | |||
| basis::byte_array & | transformed | |||
| ) | [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, 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" | ) |
| void octopi::login_tentacle::expunge | ( | const octopus_entity & | to_remove | ) | [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().
| outcome octopi::login_tentacle::reconstitute | ( | const structures::string_array & | classifier, | |
| basis::byte_array & | packed_form, | |||
| infoton *& | reformed | |||
| ) | [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 NIL, octopi::tentacle::NO_HANDLER, octopi::reconstituter(), and octopi::security_infoton::security_classifier().
1.6.3