|
Leosac
0.8.0
Open Source Access Control
|
Go to the documentation of this file.
25 #include <boost/optional.hpp>
26 #include <nlohmann/json.hpp>
57 std::pair<SecurityContext::Action, SecurityContext::ActionParam>;
65 virtual std::vector<ActionActionParam>
A SecurityContext object for users.
static Verb verb_from_request_type(const std::string &)
void enforce_permission(const std::vector< ActionActionParam > &)
virtual boost::optional< json > read_impl(const json &req)=0
std::unique_ptr< ExternalCRUDResourceHandler > ExternalCRUDResourceHandlerUPtr
std::unique_ptr< CRUDResourceHandler > CRUDResourceHandlerUPtr
Base CRUD handler for use within the websocket module.
A message sent by a client to Leosac.
A common interface for CRUD handler.
CRUDResourceHandlerUPtr(*)(RequestContext) Factory
std::pair< SecurityContext::Action, SecurityContext::ActionParam > ActionActionParam
A pair of action and their parameters.
virtual boost::optional< json > delete_impl(const json &req)=0
ExternalCRUDResourceHandler(ModuleRequestContext ctx)
static CRUDResourceHandlerUPtr instanciate(RequestContext)
This is the header file for a generated source file, GitSHA1.cpp.
ModuleRequestContext ctx_
virtual std::vector< ActionActionParam > required_permission(Verb verb, const json &req) const =0
A request context dedicated for websocket request that are handled by other modules.
ExternalCRUDResourceHandlerUPtr(*)(ModuleRequestContext) Factory
virtual boost::optional< json > update_impl(const json &req)=0
virtual UserSecurityContext & security_context() const override
Helper function that returns the security context.
virtual UserSecurityContext & security_context() const =0
Helper function that returns the security context.
virtual boost::optional< json > create_impl(const json &req)=0
Holds valuable pointer to provide context to a request.
CRUDResourceHandler(RequestContext ctx)
virtual UserSecurityContext & security_context() const override
Helper function that returns the security context.
boost::optional< json > process(const ClientMessage &msg)