diff options
author | cerevra <cerevra@yandex-team.ru> | 2022-02-10 16:45:58 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:58 +0300 |
commit | bf41dd01f6c920583e9faae7cd55ed25e547e052 (patch) | |
tree | ec7c8c285ffa648a5c5efeff453787a15ab811ac /library/cpp/tvmauth/utils.cpp | |
parent | e2c3e3004f7cd68441cefcfa4aaccd3d8051c846 (diff) | |
download | ydb-bf41dd01f6c920583e9faae7cd55ed25e547e052.tar.gz |
Restoring authorship annotation for <cerevra@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/tvmauth/utils.cpp')
-rw-r--r-- | library/cpp/tvmauth/utils.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/library/cpp/tvmauth/utils.cpp b/library/cpp/tvmauth/utils.cpp index a06cd6f5ba..16e9cb63b9 100644 --- a/library/cpp/tvmauth/utils.cpp +++ b/library/cpp/tvmauth/utils.cpp @@ -1,18 +1,18 @@ -#include "utils.h" - -namespace NTvmAuth::NUtils { - TStringBuf RemoveTicketSignature(TStringBuf ticketBody) { - if (ticketBody.size() < 2 || - ticketBody[0] != '3' || - ticketBody[1] != ':') { - return ticketBody; - } - - size_t pos = ticketBody.rfind(':'); - if (pos == TStringBuf::npos) { // impossible - return ticketBody; - } - - return ticketBody.substr(0, pos + 1); - } -} +#include "utils.h" + +namespace NTvmAuth::NUtils { + TStringBuf RemoveTicketSignature(TStringBuf ticketBody) { + if (ticketBody.size() < 2 || + ticketBody[0] != '3' || + ticketBody[1] != ':') { + return ticketBody; + } + + size_t pos = ticketBody.rfind(':'); + if (pos == TStringBuf::npos) { // impossible + return ticketBody; + } + + return ticketBody.substr(0, pos + 1); + } +} |