aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/tvmauth/src/user_ticket.cpp
diff options
context:
space:
mode:
authorqrort <qrort@yandex-team.com>2022-11-30 23:47:12 +0300
committerqrort <qrort@yandex-team.com>2022-11-30 23:47:12 +0300
commit22f8ae0e3f5d68b92aecccdf96c1d841a0334311 (patch)
treebffa27765faf54126ad44bcafa89fadecb7a73d7 /library/cpp/tvmauth/src/user_ticket.cpp
parent332b99e2173f0425444abb759eebcb2fafaa9209 (diff)
downloadydb-22f8ae0e3f5d68b92aecccdf96c1d841a0334311.tar.gz
validate canons without yatest_common
Diffstat (limited to 'library/cpp/tvmauth/src/user_ticket.cpp')
-rw-r--r--library/cpp/tvmauth/src/user_ticket.cpp56
1 files changed, 56 insertions, 0 deletions
diff --git a/library/cpp/tvmauth/src/user_ticket.cpp b/library/cpp/tvmauth/src/user_ticket.cpp
new file mode 100644
index 0000000000..3e4e0c0364
--- /dev/null
+++ b/library/cpp/tvmauth/src/user_ticket.cpp
@@ -0,0 +1,56 @@
+#include "user_impl.h"
+
+#include <library/cpp/tvmauth/checked_user_ticket.h>
+
+namespace NTvmAuth {
+ static const char* EX_MSG = "Ticket already moved out";
+
+ TCheckedUserTicket::TCheckedUserTicket(THolder<TCheckedUserTicket::TImpl> impl)
+ : Impl_(std::move(impl))
+ {
+ }
+
+ TCheckedUserTicket::TCheckedUserTicket(TCheckedUserTicket&& o) = default;
+ TCheckedUserTicket::~TCheckedUserTicket() = default;
+ TCheckedUserTicket& TCheckedUserTicket::operator=(TCheckedUserTicket&& o) = default;
+
+ TCheckedUserTicket::operator bool() const {
+ Y_ENSURE(Impl_, EX_MSG);
+ return Impl_->operator bool();
+ }
+
+ const TUids& TCheckedUserTicket::GetUids() const {
+ Y_ENSURE(Impl_, EX_MSG);
+ return Impl_->GetUids();
+ }
+
+ TUid TCheckedUserTicket::GetDefaultUid() const {
+ Y_ENSURE(Impl_, EX_MSG);
+ return Impl_->GetDefaultUid();
+ }
+
+ const TScopes& TCheckedUserTicket::GetScopes() const {
+ Y_ENSURE(Impl_, EX_MSG);
+ return Impl_->GetScopes();
+ }
+
+ bool TCheckedUserTicket::HasScope(TStringBuf scopeName) const {
+ Y_ENSURE(Impl_, EX_MSG);
+ return Impl_->HasScope(scopeName);
+ }
+
+ ETicketStatus TCheckedUserTicket::GetStatus() const {
+ Y_ENSURE(Impl_, EX_MSG);
+ return Impl_->GetStatus();
+ }
+
+ TString TCheckedUserTicket::DebugInfo() const {
+ Y_ENSURE(Impl_, EX_MSG);
+ return Impl_->DebugInfo();
+ }
+
+ EBlackboxEnv TCheckedUserTicket::GetEnv() const {
+ Y_ENSURE(Impl_, EX_MSG);
+ return Impl_->GetEnv();
+ }
+}