| 85 | } |
| 86 | |
| 87 | void 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 | |
| 100 | void ClientProxyConnection::authorize_long(std::shared_ptr<ClientProxyInfo> proxy, td::uint64 nonce) { |
| 101 | LOG(DEBUG) << "connection " << connection_id() << ": running long auth"; |
nothing calls this directly
no outgoing calls
no test coverage detected