22 #include "core/auth/AccessPoint_odb.h" 43 serialized[
"relationships"][
"access-point"] = {
44 {
"data", {{
"id", door.
access_point()->id()}, {
"type",
"access-point"}}}};
64 if (new_ap_id != current_ap_id)
88 auto tmp = json::parse(in);
std::chrono::system_clock::time_point extract_with_default(const nlohmann::json &obj, const std::string &key, const std::chrono::system_clock::time_point &tp)
Extract an ISO 8601 datetime string from a json object.
unsigned long AccessPointId
virtual std::string description() const =0
This is the header file for a generated source file, GitSHA1.cpp.
odb::lazy_shared_ptr< AccessPoint > AccessPointLPtr
Add a few useful extraction functions.
static json serialize(const Auth::IDoor &door, const SecurityContext &sc)
ServiceRegistry & get_service_registry()
A function to retrieve the ServiceRegistry from pretty much anywhere.
static void unserialize(Auth::IDoor &out, const json &in, const SecurityContext &sc)
static std::string serialize(const Auth::IDoor &in, const SecurityContext &sc)
Holds classes relevant to the Authentication and Authorization subsystem.
virtual DoorId id() const =0
A SecurityContext is used to query permission while doing an operation.
Provides various database-related services to consumer.
virtual IAccessPointPtr access_point() const =0
std::shared_ptr< ServiceInterface > get_service() const
Retrieve the service instance implementing the ServiceInterface, or nullptr if no such service was re...
static void unserialize(Auth::IDoor &out, const std::string &in, const SecurityContext &sc)
std::shared_ptr< odb::database > DBPtr
virtual std::string alias() const =0