55 "The serializer didn't set a type.");
65 : security_context_(sc)
static std::string type_name(const Cred::ICredential &in)
Returns the "type-name" of the credential.
Non static helper that can visit credential object.
This is the header file for a generated source file, GitSHA1.cpp.
static SecurityContext & instance()
Interface for RFIDCard credential.
Base interface for credential objects.
json payload_
The payload to unserialize from.
static void unserialize(Cred::IRFIDCard &out, const json &in, const SecurityContext &sc)
static void unserialize(Cred::IPinCode &out, const json &in, const SecurityContext &sc)
const SecurityContext & security_context_
Reference to the security context.
Interface for PinCode credentials.
HelperUnserialize(const SecurityContext &sc, const json &payload)
json result_
Store the result here because we can't return from the visit() method.
static json serialize(const Cred::IRFIDCard &in, const SecurityContext &sc)
static json serialize(const Cred::ICredential &in, const SecurityContext &sc)
static std::string serialize(const Cred::ICredential &in, const SecurityContext &sc)
static void unserialize(Cred::ICredential &out, const json &in, const SecurityContext &sc)
A SecurityContext is used to query permission while doing an operation.
#define ASSERT_LOG(cond, msg)
void visit(const Cred::IRFIDCard &t) override
HelperSerialize(const SecurityContext &sc)
static json serialize(const Cred::IPinCode &in, const SecurityContext &sc)
void visit(Cred::IRFIDCard &t) override
const SecurityContext & security_context_
Reference to the security context.