From d084c069be38b6f3ad74912ca629403d9fdaec58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Wed, 11 Dec 2019 22:14:12 +0100 Subject: Identity loading and validation --- include/erebos/identity.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 include/erebos/identity.h (limited to 'include/erebos/identity.h') diff --git a/include/erebos/identity.h b/include/erebos/identity.h new file mode 100644 index 0000000..7b66d82 --- /dev/null +++ b/include/erebos/identity.h @@ -0,0 +1,23 @@ +#pragma once + +#include + +namespace erebos { + +class Identity +{ +public: + static std::optional load(const Ref &); + static std::optional load(const std::vector &); + + std::optional name() const; + std::optional owner() const; + +private: + struct Priv; + const std::shared_ptr p; + Identity(const Priv * p): p(p) {} + Identity(std::shared_ptr && p): p(std::move(p)) {} +}; + +} -- cgit v1.2.3