// Copyright 2023 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROMEOS_ASH_COMPONENTS_OSAUTH_PUBLIC_COMMON_TYPES_H_ #define CHROMEOS_ASH_COMPONENTS_OSAUTH_PUBLIC_COMMON_TYPES_H_ #include <string> #include "base/component_export.h" #include "base/containers/enum_set.h" #include "base/functional/callback.h" #include "components/account_id/account_id.h" namespace ash { class UserContext; // This token represents authentication proof. It can be safely passed // between components, and can be used to obtain authenticated // 'UserContext' from `AuthSessionStorage` to perform authenticated // operations. // TODO(b/259528315): Once switch from QuickUnlockStorage is completed, // replace it with StrongAlias or UnguessableToken. AuthProofToken; // Authentication can be required for different scenarios, // with some specifics or trade-offs. This enumeration allows // to distinguish such scenarios when requesting authentication. // // Important! These values are persisted in LocalState, do not renumber them. enum class AuthPurpose { … }; // Authentication factors (and their implementations) that can be used // for interactive authentication in Ash. // Not to be confused with cryptohome AuthFactors: // * Some factors (like SmartLock) are implemented without cryptohome; // * Some cryptohome factors (like Kiosk) are not used for regular user // authentication; // * Multiple factors (e.g. GAIA password and Local password) might be // backed by the same cryptohome factor. // // Important! These values are persisted in LocalState, do not renumber them. enum class AshAuthFactor { … }; AuthFactorsSet; enum class AuthHubMode { … }; struct COMPONENT_EXPORT(CHROMEOS_ASH_COMPONENTS_OSAUTH) AuthAttemptVector { … }; BorrowContextCallback; } // namespace ash #endif // CHROMEOS_ASH_COMPONENTS_OSAUTH_PUBLIC_COMMON_TYPES_H_