#include "remoting/base/corp_session_authz_service_client.h"
#include <memory>
#include <utility>
#include "base/functional/bind.h"
#include "net/traffic_annotation/network_traffic_annotation.h"
#include "remoting/base/internal_headers.h"
#include "remoting/base/protobuf_http_request.h"
#include "remoting/base/protobuf_http_request_config.h"
#include "remoting/base/service_urls.h"
#include "remoting/proto/session_authz_service.h"
namespace remoting {
namespace {
ResponseCallback;
template <typename ProtoType, typename StructType>
using ConversionFunction = std::unique_ptr<StructType> (*)(const ProtoType&);
template <typename ProtoType, typename StructType>
ResponseCallback<ProtoType> ConvertCallback(
ResponseCallback<StructType> struct_callback,
ConversionFunction<ProtoType, StructType> conversion_function) { … }
}
CorpSessionAuthzServiceClient::CorpSessionAuthzServiceClient(
scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory,
std::unique_ptr<OAuthTokenGetter> oauth_token_getter)
: … { … }
CorpSessionAuthzServiceClient::~CorpSessionAuthzServiceClient() = default;
void CorpSessionAuthzServiceClient::GenerateHostToken(
GenerateHostTokenCallback callback) { … }
void CorpSessionAuthzServiceClient::VerifySessionToken(
const internal::VerifySessionTokenRequestStruct& request,
VerifySessionTokenCallback callback) { … }
void CorpSessionAuthzServiceClient::ReauthorizeHost(
const internal::ReauthorizeHostRequestStruct& request,
ReauthorizeHostCallback callback) { … }
template <typename CallbackType>
void CorpSessionAuthzServiceClient::ExecuteRequest(
const net::NetworkTrafficAnnotationTag& traffic_annotation,
const std::string& path,
std::unique_ptr<google::protobuf::MessageLite> request_message,
CallbackType callback) { … }
}