Enum Class AuditAction

java.lang.Object
java.lang.Enum<AuditAction>
com.serinity.accesscontrol.flag.AuditAction
All Implemented Interfaces:
Serializable, Comparable<AuditAction>, Constable

public enum AuditAction extends Enum<AuditAction>
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:

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:
  • Enum Constant Details

    • USER_SIGN_UP

      public static final AuditAction USER_SIGN_UP
      User registration event.
    • USER_LOGIN

      public static final AuditAction USER_LOGIN
      Successful credential-based login event.
    • USER_FACE_LOGIN

      public static final AuditAction USER_FACE_LOGIN
      Successful face-recognition login event.
    • USER_LOGOUT

      public static final AuditAction USER_LOGOUT
      User logout event.
    • USER_LOGIN_FAILED

      public static final AuditAction USER_LOGIN_FAILED
      Failed login attempt event.
    • TOKEN_REFRESH

      public static final AuditAction TOKEN_REFRESH
      Refresh token usage event.
    • SESSION_REVOKED

      public static final AuditAction SESSION_REVOKED
      Session revocation event.
    • PASSWORD_CHANGED

      public static final AuditAction PASSWORD_CHANGED
      Password change event.
    • USER_UPDATED

      public static final AuditAction USER_UPDATED
      User profile update event.
    • USER_DELETED

      public static final AuditAction USER_DELETED
      User deletion event.
    • ROLE_CHANGED

      public static final AuditAction ROLE_CHANGED
      User role update event.
  • Method Details

    • values

      public static AuditAction[] 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

      public static AuditAction valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getValue

      public String getValue()
      Returns the persisted action value.
      Returns:
      action value used in audit records
    • toString

      public String toString()
      Overrides:
      toString in class Enum<AuditAction>