aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/tvmauth/deprecated/user_context.cpp
diff options
context:
space:
mode:
authorkomels <komels@yandex-team.ru>2022-04-14 13:10:53 +0300
committerkomels <komels@yandex-team.ru>2022-04-14 13:10:53 +0300
commit21c9b0e6b039e9765eb414c406c2b86e8cea6850 (patch)
treef40ebc18ff8958dfbd189954ad024043ca983ea5 /library/cpp/tvmauth/deprecated/user_context.cpp
parent9a4effa852abe489707139c2b260dccc6f4f9aa9 (diff)
downloadydb-21c9b0e6b039e9765eb414c406c2b86e8cea6850.tar.gz
Final part on compatibility layer: LOGBROKER-7215
ref:777c67aadbf705d19034a09a792b2df61ba53697
Diffstat (limited to 'library/cpp/tvmauth/deprecated/user_context.cpp')
-rw-r--r--library/cpp/tvmauth/deprecated/user_context.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/library/cpp/tvmauth/deprecated/user_context.cpp b/library/cpp/tvmauth/deprecated/user_context.cpp
new file mode 100644
index 0000000000..712f622f1a
--- /dev/null
+++ b/library/cpp/tvmauth/deprecated/user_context.cpp
@@ -0,0 +1,20 @@
+#include <library/cpp/tvmauth/checked_user_ticket.h>
+#include <library/cpp/tvmauth/src/user_impl.h>
+
+namespace NTvmAuth {
+ static const char* EX_MSG = "UserContext already moved out";
+
+ TUserContext::TUserContext(EBlackboxEnv env, TStringBuf tvmKeysResponse)
+ : Impl_(MakeHolder<TImpl>(env, tvmKeysResponse))
+ {
+ }
+
+ TUserContext::TUserContext(TUserContext&& o) = default;
+ TUserContext& TUserContext::operator=(TUserContext&& o) = default;
+ TUserContext::~TUserContext() = default;
+
+ TCheckedUserTicket TUserContext::Check(TStringBuf ticketBody) const {
+ Y_ENSURE(Impl_, EX_MSG);
+ return Impl_->Check(ticketBody);
+ }
+}