reauth_reason.h 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. // Copyright 2022 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef ASH_PUBLIC_CPP_REAUTH_REASON_H_
  5. #define ASH_PUBLIC_CPP_REAUTH_REASON_H_
  6. namespace ash {
  7. // Track all the ways a user may be sent through the re-auth flow.
  8. // This enum is used to define the buckets for an enumerated UMA histogram.
  9. // Hence, existing enumerated constants should never be reordered, and all new
  10. // constants should only be appended at the end of the enumeration.
  11. enum ReauthReason {
  12. // Default value: no reauth reasons were detected so far, or the reason was
  13. // already reported.
  14. NONE = 0,
  15. // Legacy profile holders.
  16. OTHER = 1,
  17. // Password changed, revoked credentials, account deleted.
  18. INVALID_TOKEN_HANDLE = 2,
  19. // Incorrect password entered 3 times at the user pod.
  20. INCORRECT_PASSWORD_ENTERED = 3,
  21. // Incorrect password entered by a SAML user once.
  22. // OS would show a tooltip offering user to complete the online sign-in.
  23. INCORRECT_SAML_PASSWORD_ENTERED = 4,
  24. // Device policy is set not to show user pods, which requires re-auth on every
  25. // login.
  26. SAML_REAUTH_POLICY = 5,
  27. // Cryptohome is missing, most likely due to deletion during garbage
  28. // collection.
  29. MISSING_CRYPTOHOME = 6,
  30. // During last login OS failed to connect to the sync with the existing RT.
  31. // This could be due to account deleted, password changed, account revoked,
  32. // etc.
  33. SYNC_FAILED = 7,
  34. // User cancelled the password change prompt when prompted by Chrome OS.
  35. PASSWORD_UPDATE_SKIPPED = 8,
  36. // SAML password sync token validation failed.
  37. SAML_PASSWORD_SYNC_TOKEN_VALIDATION_FAILED = 9,
  38. // Corrupted cryptohome
  39. UNRECOVERABLE_CRYPTOHOME = 10,
  40. // Gaia policy is set, which requires re-auth on every login if the offline
  41. // login time limit has been reached.
  42. GAIA_REAUTH_POLICY = 11,
  43. // Gaia lock screen re-auth policy is set, which requires re-auth on lock
  44. // screen if the offline lock screen time limit has been reached.
  45. GAIA_LOCK_SCREEN_REAUTH_POLICY = 12,
  46. // Saml lock screen re-auth policy is set, which requires re-auth on lock
  47. // screen if the offline lock screen time limit has been reached.
  48. SAML_LOCK_SCREEN_REAUTH_POLICY = 13,
  49. // "Forgot Password" button clicked on the sign-in screen when password is
  50. // entered wrongly.
  51. FORGOT_PASSWORD = 14,
  52. // Must be the last value in this list.
  53. NUM_REAUTH_FLOW_REASONS,
  54. };
  55. } // namespace ash
  56. #endif // ASH_PUBLIC_CPP_REAUTH_REASON_H_