#include "remoting/protocol/session_authz_reauthorizer.h"
#include <memory>
#include "base/check.h"
#include "base/functional/bind.h"
#include "base/location.h"
#include "base/logging.h"
#include "base/time/time.h"
#include "net/base/backoff_entry.h"
#include "remoting/base/logging.h"
#include "remoting/proto/session_authz_service.h"
#include "remoting/protocol/errors.h"
#include "remoting/protocol/session.h"
namespace remoting::protocol {
namespace {
constexpr net::BackoffEntry::Policy kBackoffPolicy = …;
bool IsRetriableError(ProtobufHttpStatus::Code code) { … }
}
SessionAuthzReauthorizer::SessionAuthzReauthorizer(
SessionAuthzServiceClient* service_client,
std::string_view session_id,
std::string_view session_reauth_token,
base::TimeDelta session_reauth_token_lifetime,
base::OnceClosure on_reauthorization_failed)
: … { … }
SessionAuthzReauthorizer::~SessionAuthzReauthorizer() = default;
void SessionAuthzReauthorizer::Start() { … }
const net::BackoffEntry* SessionAuthzReauthorizer::GetBackoffEntryForTest()
const { … }
void SessionAuthzReauthorizer::ScheduleNextReauth() { … }
void SessionAuthzReauthorizer::Reauthorize() { … }
void SessionAuthzReauthorizer::OnReauthorizeResult(
const ProtobufHttpStatus& status,
std::unique_ptr<internal::ReauthorizeHostResponseStruct> response) { … }
void SessionAuthzReauthorizer::NotifyReauthorizationFailed() { … }
}