Leosac
0.8.0
Open Source Access Control
|
This service lets various AccessPoint backend register and provide implementation to use by the AccessPointCRUD object. More...
#include <AccessPointService.hpp>
Public Member Functions | |
void | register_backend (const std::string &controller_module, AccessPointBackend *backend) |
Register an AccessPointBackend for controller_module . More... | |
void | unregister_backend (const std::string &controller_module) |
AccessPointBackend * | get_backend (const std::string &controller_module) |
Get the AccessPointBackend that supports the given controller_module . More... | |
Public Member Functions inherited from Leosac::ExtensibleSerializer< json, Auth::IAccessPoint, const SecurityContext & > | |
json | serialize (const Auth::IAccessPoint &input, AdditionalArgs &&... args) const |
void | register_serializer (Callable &&callable) |
Register a serializer for T. More... | |
void | unregister_serializer () |
Private Attributes | |
std::mutex | mutex_ |
std::map< std::string, AccessPointBackend * > | backends_ |
The various backend for various type of AccessPoint. More... | |
Additional Inherited Members | |
Public Types inherited from Leosac::ExtensibleSerializer< json, Auth::IAccessPoint, const SecurityContext & > | |
using | SerializationCallable = std::function< json(const Auth::IAccessPoint &, AdditionalArgs &&...)> |
Callable type for serialization. More... | |
This service lets various AccessPoint backend register and provide implementation to use by the AccessPointCRUD object.
The registration is done by specifying the name (string) of the controller module for the type of AccessPoint.
Definition at line 69 of file AccessPointService.hpp.
AccessPointBackend * Leosac::Auth::AccessPointService::get_backend | ( | const std::string & | controller_module | ) |
Get the AccessPointBackend that supports the given controller_module
.
Definition at line 28 of file AccessPointService.cpp.
|
inline |
Register an AccessPointBackend for controller_module
.
The backend object MUST stay alive until a corresponding call to unregister_backend() is made.
Definition at line 79 of file AccessPointService.hpp.
|
inline |
Definition at line 89 of file AccessPointService.hpp.
|
private |
The various backend for various type of AccessPoint.
Those are registered by modules.
Definition at line 110 of file AccessPointService.hpp.
|
mutableprivate |
Definition at line 104 of file AccessPointService.hpp.