diff options
author | ppodolsky <ppodolsky@yandex-team.ru> | 2022-02-10 16:48:03 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:48:03 +0300 |
commit | e232fc1c53d9880cb57b47c5186b8a11700944bf (patch) | |
tree | b222e5ac2e2e98872661c51ccceee5da0d291e13 /library/cpp/tvmauth/src/parser.h | |
parent | ff24d93e6130e0944ce0c9e2d2f54e1e88fc08dd (diff) | |
download | ydb-e232fc1c53d9880cb57b47c5186b8a11700944bf.tar.gz |
Restoring authorship annotation for <ppodolsky@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/tvmauth/src/parser.h')
-rw-r--r-- | library/cpp/tvmauth/src/parser.h | 84 |
1 files changed, 42 insertions, 42 deletions
diff --git a/library/cpp/tvmauth/src/parser.h b/library/cpp/tvmauth/src/parser.h index 279c15beef..678e709444 100644 --- a/library/cpp/tvmauth/src/parser.h +++ b/library/cpp/tvmauth/src/parser.h @@ -1,51 +1,51 @@ -#pragma once - +#pragma once + #include <library/cpp/tvmauth/src/protos/ticket2.pb.h> #include <library/cpp/tvmauth/src/rw/keys.h> - + #include <library/cpp/tvmauth/ticket_status.h> - -#include <util/generic/fwd.h> - -#include <string> - + +#include <util/generic/fwd.h> + +#include <string> + namespace NTvmAuth { - struct TParserTvmKeys { + struct TParserTvmKeys { static inline const char DELIM = ':'; - static TString ParseStrV1(TStringBuf str); - }; - - struct TParserTickets { - static const char DELIM = ':'; - - static TStringBuf UserFlag(); - static TStringBuf ServiceFlag(); - - struct TRes { + static TString ParseStrV1(TStringBuf str); + }; + + struct TParserTickets { + static const char DELIM = ':'; + + static TStringBuf UserFlag(); + static TStringBuf ServiceFlag(); + + struct TRes { TRes(ETicketStatus status) - : Status(status) - { - } - + : Status(status) + { + } + ETicketStatus Status; - - ticket2::Ticket Ticket; - }; - static TRes ParseV3(TStringBuf body, const NRw::TPublicKeys& keys, TStringBuf type); - - // private: - struct TStrRes { + + ticket2::Ticket Ticket; + }; + static TRes ParseV3(TStringBuf body, const NRw::TPublicKeys& keys, TStringBuf type); + + // private: + struct TStrRes { const ETicketStatus Status; - - TString Proto; - TString Sign; - - TStringBuf ForCheck; - - bool operator==(const TStrRes& o) const { // for tests - return Status == o.Status && Proto == o.Proto && Sign == o.Sign && ForCheck == o.ForCheck; - } - }; - static TStrRes ParseStrV3(TStringBuf body, TStringBuf type); - }; + + TString Proto; + TString Sign; + + TStringBuf ForCheck; + + bool operator==(const TStrRes& o) const { // for tests + return Status == o.Status && Proto == o.Proto && Sign == o.Sign && ForCheck == o.ForCheck; + } + }; + static TStrRes ParseStrV3(TStringBuf body, TStringBuf type); + }; } |