summaryrefslogtreecommitdiffstats
path: root/library/cpp/tvmauth/deprecated
diff options
context:
space:
mode:
authorcerevra <[email protected]>2022-02-10 16:45:58 +0300
committerDaniil Cherednik <[email protected]>2022-02-10 16:45:58 +0300
commitbf41dd01f6c920583e9faae7cd55ed25e547e052 (patch)
treeec7c8c285ffa648a5c5efeff453787a15ab811ac /library/cpp/tvmauth/deprecated
parente2c3e3004f7cd68441cefcfa4aaccd3d8051c846 (diff)
Restoring authorship annotation for <[email protected]>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/tvmauth/deprecated')
-rw-r--r--library/cpp/tvmauth/deprecated/README.md4
-rw-r--r--library/cpp/tvmauth/deprecated/service_context.cpp74
-rw-r--r--library/cpp/tvmauth/deprecated/service_context.h126
-rw-r--r--library/cpp/tvmauth/deprecated/user_context.cpp40
-rw-r--r--library/cpp/tvmauth/deprecated/user_context.h60
5 files changed, 152 insertions, 152 deletions
diff --git a/library/cpp/tvmauth/deprecated/README.md b/library/cpp/tvmauth/deprecated/README.md
index d9ea09c3c08..fffea3ae774 100644
--- a/library/cpp/tvmauth/deprecated/README.md
+++ b/library/cpp/tvmauth/deprecated/README.md
@@ -1,2 +1,2 @@
-Please don't use this part of library directly.
-Please use [TTvmClient](https://a.yandex-team.ru/arc/trunk/arcadia/library/cpp/tvmauth/README.md) instead.
+Please don't use this part of library directly.
+Please use [TTvmClient](https://a.yandex-team.ru/arc/trunk/arcadia/library/cpp/tvmauth/README.md) instead.
diff --git a/library/cpp/tvmauth/deprecated/service_context.cpp b/library/cpp/tvmauth/deprecated/service_context.cpp
index 24822a9d530..e0976de0a69 100644
--- a/library/cpp/tvmauth/deprecated/service_context.cpp
+++ b/library/cpp/tvmauth/deprecated/service_context.cpp
@@ -1,37 +1,37 @@
-#include <library/cpp/tvmauth/checked_service_ticket.h>
-#include <library/cpp/tvmauth/src/service_impl.h>
-
-namespace NTvmAuth {
- static const char* EX_MSG = "ServiceContext already moved out";
-
- TServiceContext::TServiceContext(TStringBuf secretBase64, TTvmId selfTvmId, TStringBuf tvmKeysResponse)
- : Impl_(MakeHolder<TImpl>(secretBase64, selfTvmId, tvmKeysResponse))
- {
- }
-
- TServiceContext::TServiceContext(TServiceContext&& o) = default;
- TServiceContext& TServiceContext::operator=(TServiceContext&& o) = default;
- TServiceContext::~TServiceContext() = default;
-
- TServiceContext TServiceContext::CheckingFactory(TTvmId selfTvmId, TStringBuf tvmKeysResponse) {
- TServiceContext c;
- c.Impl_ = MakeHolder<TImpl>(selfTvmId, tvmKeysResponse);
- return c;
- }
-
- TServiceContext TServiceContext::SigningFactory(TStringBuf secretBase64) {
- TServiceContext c;
- c.Impl_ = MakeHolder<TImpl>(secretBase64);
- return c;
- }
-
- TCheckedServiceTicket TServiceContext::Check(TStringBuf ticketBody) const {
- Y_ENSURE(Impl_, EX_MSG);
- return Impl_->Check(ticketBody);
- }
-
- TString TServiceContext::SignCgiParamsForTvm(TStringBuf ts, TStringBuf dst, TStringBuf scopes) const {
- Y_ENSURE(Impl_, EX_MSG);
- return Impl_->SignCgiParamsForTvm(ts, dst, scopes);
- }
-}
+#include <library/cpp/tvmauth/checked_service_ticket.h>
+#include <library/cpp/tvmauth/src/service_impl.h>
+
+namespace NTvmAuth {
+ static const char* EX_MSG = "ServiceContext already moved out";
+
+ TServiceContext::TServiceContext(TStringBuf secretBase64, TTvmId selfTvmId, TStringBuf tvmKeysResponse)
+ : Impl_(MakeHolder<TImpl>(secretBase64, selfTvmId, tvmKeysResponse))
+ {
+ }
+
+ TServiceContext::TServiceContext(TServiceContext&& o) = default;
+ TServiceContext& TServiceContext::operator=(TServiceContext&& o) = default;
+ TServiceContext::~TServiceContext() = default;
+
+ TServiceContext TServiceContext::CheckingFactory(TTvmId selfTvmId, TStringBuf tvmKeysResponse) {
+ TServiceContext c;
+ c.Impl_ = MakeHolder<TImpl>(selfTvmId, tvmKeysResponse);
+ return c;
+ }
+
+ TServiceContext TServiceContext::SigningFactory(TStringBuf secretBase64) {
+ TServiceContext c;
+ c.Impl_ = MakeHolder<TImpl>(secretBase64);
+ return c;
+ }
+
+ TCheckedServiceTicket TServiceContext::Check(TStringBuf ticketBody) const {
+ Y_ENSURE(Impl_, EX_MSG);
+ return Impl_->Check(ticketBody);
+ }
+
+ TString TServiceContext::SignCgiParamsForTvm(TStringBuf ts, TStringBuf dst, TStringBuf scopes) const {
+ Y_ENSURE(Impl_, EX_MSG);
+ return Impl_->SignCgiParamsForTvm(ts, dst, scopes);
+ }
+}
diff --git a/library/cpp/tvmauth/deprecated/service_context.h b/library/cpp/tvmauth/deprecated/service_context.h
index bc14d381b24..5dc836261ba 100644
--- a/library/cpp/tvmauth/deprecated/service_context.h
+++ b/library/cpp/tvmauth/deprecated/service_context.h
@@ -1,63 +1,63 @@
-#pragma once
-
-#include <library/cpp/tvmauth/checked_service_ticket.h>
-
-#include <util/generic/ptr.h>
-
-namespace NTvmAuth {
- class TServiceContext: public TAtomicRefCount<TServiceContext> {
- public:
- /*!
- * Create service context. Serivce contexts are used to store TVM keys and parse service tickets.
- * @param selfTvmId
- * @param secretBase64
- * @param tvmKeysResponse
- */
- TServiceContext(TStringBuf secretBase64, TTvmId selfTvmId, TStringBuf tvmKeysResponse);
- TServiceContext(TServiceContext&&);
- ~TServiceContext();
-
- /*!
- * Create service context only for checking service tickets
- * \param[in] selfTvmId
- * \param[in] tvmKeysResponse
- * \return
- */
- static TServiceContext CheckingFactory(TTvmId selfTvmId, TStringBuf tvmKeysResponse);
-
- /*!
- * Create service context only for signing HTTP request to TVM-API
- * \param[in] secretBase64
- * \return
- */
- static TServiceContext SigningFactory(TStringBuf secretBase64);
-
- TServiceContext& operator=(TServiceContext&&);
-
- /*!
- * Parse and validate service ticket body then create TCheckedServiceTicket object.
- * @param ticketBody
- * @return TCheckedServiceTicket object
- */
- TCheckedServiceTicket Check(TStringBuf ticketBody) const;
-
- /*!
- * Sign params for TVM API
- * @param ts Param 'ts' of request to TVM
- * @param dst Param 'dst' of request to TVM
- * @param scopes Param 'scopes' of request to TVM
- * @return Signed string
- */
- TString SignCgiParamsForTvm(TStringBuf ts, TStringBuf dst, TStringBuf scopes = TStringBuf()) const;
-
- class TImpl;
-
- private:
- TServiceContext() = default;
-
- private:
- THolder<TImpl> Impl_;
- };
-
- using TServiceContextPtr = TIntrusiveConstPtr<TServiceContext>;
-}
+#pragma once
+
+#include <library/cpp/tvmauth/checked_service_ticket.h>
+
+#include <util/generic/ptr.h>
+
+namespace NTvmAuth {
+ class TServiceContext: public TAtomicRefCount<TServiceContext> {
+ public:
+ /*!
+ * Create service context. Serivce contexts are used to store TVM keys and parse service tickets.
+ * @param selfTvmId
+ * @param secretBase64
+ * @param tvmKeysResponse
+ */
+ TServiceContext(TStringBuf secretBase64, TTvmId selfTvmId, TStringBuf tvmKeysResponse);
+ TServiceContext(TServiceContext&&);
+ ~TServiceContext();
+
+ /*!
+ * Create service context only for checking service tickets
+ * \param[in] selfTvmId
+ * \param[in] tvmKeysResponse
+ * \return
+ */
+ static TServiceContext CheckingFactory(TTvmId selfTvmId, TStringBuf tvmKeysResponse);
+
+ /*!
+ * Create service context only for signing HTTP request to TVM-API
+ * \param[in] secretBase64
+ * \return
+ */
+ static TServiceContext SigningFactory(TStringBuf secretBase64);
+
+ TServiceContext& operator=(TServiceContext&&);
+
+ /*!
+ * Parse and validate service ticket body then create TCheckedServiceTicket object.
+ * @param ticketBody
+ * @return TCheckedServiceTicket object
+ */
+ TCheckedServiceTicket Check(TStringBuf ticketBody) const;
+
+ /*!
+ * Sign params for TVM API
+ * @param ts Param 'ts' of request to TVM
+ * @param dst Param 'dst' of request to TVM
+ * @param scopes Param 'scopes' of request to TVM
+ * @return Signed string
+ */
+ TString SignCgiParamsForTvm(TStringBuf ts, TStringBuf dst, TStringBuf scopes = TStringBuf()) const;
+
+ class TImpl;
+
+ private:
+ TServiceContext() = default;
+
+ private:
+ THolder<TImpl> Impl_;
+ };
+
+ using TServiceContextPtr = TIntrusiveConstPtr<TServiceContext>;
+}
diff --git a/library/cpp/tvmauth/deprecated/user_context.cpp b/library/cpp/tvmauth/deprecated/user_context.cpp
index 712f622f1a8..5ff7714db53 100644
--- a/library/cpp/tvmauth/deprecated/user_context.cpp
+++ b/library/cpp/tvmauth/deprecated/user_context.cpp
@@ -1,20 +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);
- }
-}
+#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);
+ }
+}
diff --git a/library/cpp/tvmauth/deprecated/user_context.h b/library/cpp/tvmauth/deprecated/user_context.h
index f7fe67d02ed..3b2503b9b12 100644
--- a/library/cpp/tvmauth/deprecated/user_context.h
+++ b/library/cpp/tvmauth/deprecated/user_context.h
@@ -1,30 +1,30 @@
-#pragma once
-
-#include <library/cpp/tvmauth/checked_user_ticket.h>
-
-#include <util/generic/ptr.h>
-
-namespace NTvmAuth {
- class TUserContext: public TAtomicRefCount<TUserContext> {
- public:
- TUserContext(EBlackboxEnv env, TStringBuf tvmKeysResponse);
- TUserContext(TUserContext&&);
- ~TUserContext();
-
- TUserContext& operator=(TUserContext&&);
-
- /*!
- * Parse and validate user ticket body then create TCheckedUserTicket object.
- * @param ticketBody
- * @return TCheckedUserTicket object
- */
- TCheckedUserTicket Check(TStringBuf ticketBody) const;
-
- class TImpl;
-
- private:
- THolder<TImpl> Impl_;
- };
-
- using TUserContextPtr = TIntrusiveConstPtr<TUserContext>;
-}
+#pragma once
+
+#include <library/cpp/tvmauth/checked_user_ticket.h>
+
+#include <util/generic/ptr.h>
+
+namespace NTvmAuth {
+ class TUserContext: public TAtomicRefCount<TUserContext> {
+ public:
+ TUserContext(EBlackboxEnv env, TStringBuf tvmKeysResponse);
+ TUserContext(TUserContext&&);
+ ~TUserContext();
+
+ TUserContext& operator=(TUserContext&&);
+
+ /*!
+ * Parse and validate user ticket body then create TCheckedUserTicket object.
+ * @param ticketBody
+ * @return TCheckedUserTicket object
+ */
+ TCheckedUserTicket Check(TStringBuf ticketBody) const;
+
+ class TImpl;
+
+ private:
+ THolder<TImpl> Impl_;
+ };
+
+ using TUserContextPtr = TIntrusiveConstPtr<TUserContext>;
+}