chromium/chrome/browser/enterprise/connectors/device_trust/navigation_throttle.h

// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_BROWSER_ENTERPRISE_CONNECTORS_DEVICE_TRUST_NAVIGATION_THROTTLE_H_
#define CHROME_BROWSER_ENTERPRISE_CONNECTORS_DEVICE_TRUST_NAVIGATION_THROTTLE_H_

#include "base/callback_list.h"
#include "base/memory/raw_ptr.h"
#include "base/time/time.h"
#include "base/values.h"
#include "content/public/browser/navigation_throttle.h"

namespace device_signals {
class UserPermissionService;
}  // namespace device_signals

class ConsentRequester;

namespace enterprise_connectors {

class DeviceTrustService;
struct DeviceTrustResponse;

// DeviceTrustNavigationThrottle provides a simple way to start a handshake
// between Chrome and an origin based on a list of trusted URLs set in the
// `ContextAwareAccessSignalsAllowlist` policy.
//
// The handshake begins when the user visits a trusted URL. Chrome
// adds the (X-Device-Trust: VerifiedAccess) HTTP header to the request.
// When the origin detects this header it responds with a 302 redirect that
// includes a Verified Access challenge in the X-Verified-Access-Challenge HTTP
// header. Chrome uses the challenge to build a challenge response that is sent
// back to the origin via the X-Verified-Access-Challenge-Response HTTP header.
class DeviceTrustNavigationThrottle : public content::NavigationThrottle {};

}  // namespace enterprise_connectors

#endif  // CHROME_BROWSER_ENTERPRISE_CONNECTORS_DEVICE_TRUST_NAVIGATION_THROTTLE_H_