MCPcopy Create free account
hub / github.com/TelegramMessenger/cocoon / run_authorization

Method run_authorization

runners/client/ClientProxyConnection.cpp:87–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85}
86
87void ClientProxyConnection::run_authorization(std::shared_ptr<ClientProxyInfo> proxy,
88 ton::tl_object_ptr<cocoon_api::client_ProxyConnectionAuth> auth) {
89 cocoon_api::downcast_call(
90 *auth, td::overloaded([&](cocoon_api::client_proxyConnectionAuthLong &obj) { authorize_long(proxy, obj.nonce_); },
91 [&](cocoon_api::client_proxyConnectionAuthShort &obj) {
92 if (runner()->secret_hash() == obj.secret_hash_) {
93 authorize_short(proxy);
94 } else {
95 authorize_long(proxy, obj.nonce_);
96 }
97 }));
98}
99
100void ClientProxyConnection::authorize_long(std::shared_ptr<ClientProxyInfo> proxy, td::uint64 nonce) {
101 LOG(DEBUG) << "connection " << connection_id() << ": running long auth";

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected