Enum Class AuditAction
- All Implemented Interfaces:
Serializable, Comparable<AuditAction>, Constable
Represents the different audit actions that can be recorded
in the system.
This enum is used to define and enforce all possible audit event types triggered by authentication, security, or user management operations.
Actions can include:
USER_SIGN_UP- A new user account was createdUSER_LOGIN- A user successfully logged inUSER_LOGIN_FAILED- A login attempt failedUSER_LOGOUT- A user logged outTOKEN_REFRESH- A refresh token was usedSESSION_REVOKED- A session was manually revokedPASSWORD_CHANGED- A user changed their passwordUSER_UPDATED- A user account was updatedUSER_DELETED- A user account was deletedROLE_CHANGED- A user role was modified
This ensures that audit logging remains consistent, type-safe, and refactor-proof across the system.
- Since:
- 2026-02-17
- Version:
- 1.0
- Author:
- @ZouariOmar
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionPassword change event.User role update event.Session revocation event.Refresh token usage event.User deletion event.Successful face-recognition login event.Successful credential-based login event.Failed login attempt event.User logout event.User registration event.User profile update event. -
Method Summary
Modifier and TypeMethodDescriptiongetValue()Returns the persisted action value.toString()static AuditActionReturns the enum constant of this class with the specified name.static AuditAction[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
USER_SIGN_UP
User registration event. -
USER_LOGIN
Successful credential-based login event. -
USER_FACE_LOGIN
Successful face-recognition login event. -
USER_LOGOUT
User logout event. -
USER_LOGIN_FAILED
Failed login attempt event. -
TOKEN_REFRESH
Refresh token usage event. -
SESSION_REVOKED
Session revocation event. -
PASSWORD_CHANGED
Password change event. -
USER_UPDATED
User profile update event. -
USER_DELETED
User deletion event. -
ROLE_CHANGED
User role update event.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getValue
Returns the persisted action value.- Returns:
- action value used in audit records
-
toString
- Overrides:
toStringin classEnum<AuditAction>
-