// Copyright 2018 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef COMPONENTS_POLICY_CORE_COMMON_CLOUD_DM_AUTH_H_ #define COMPONENTS_POLICY_CORE_COMMON_CLOUD_DM_AUTH_H_ #include <memory> #include <string> #include "base/check_op.h" #include "components/policy/policy_export.h" namespace policy { // The enum type for the token used for authentication. Explicit values are // set to allow easy identification of value from the logs. enum class DMAuthTokenType { … }; // Class that encapsulates different authentication methods to interact with // device management service. // We currently have 3 methods for authentication: // * OAuth token, that is passed as a part of URL // * Enrollment token, provided by installation configuration, passed as // Authorization: GoogleEnrollmentToken header // * DMToken, created during Register request, passed as // Authorization: GoogleDMToken header // Also, several requests require no authentication (e.g. enterprise_check) or // embed some authentication in the payload (e.g. certificate_based_register). class POLICY_EXPORT DMAuth { … }; } // namespace policy #endif // COMPONENTS_POLICY_CORE_COMMON_CLOUD_DM_AUTH_H_