Enum Class CallerMode

java.lang.Object
java.lang.Enum<CallerMode>
com.fayupable.logged.core.annotation.CallerMode
All Implemented Interfaces:
Serializable, Comparable<CallerMode>, Constable

public enum CallerMode extends Enum<CallerMode>
Controls how an authenticated caller's identity is written into an invocation event, for applications where the authenticated name is personal data (for example an e-mail address used as the username, which is personal data under GDPR / KVKK).

Only the authenticated-principal tier of caller identity is affected. The IP fallback used for unauthenticated callers and the "unknown" placeholder are never changed by this setting.

  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Use an application-provided resolver (for example logged-spring's CallerIdentityResolver bean) to produce the identity, typically an internal user id instead of the login name.
    Use the application-wide setting (for example logged.client-info.caller in logged-spring).
    Mask the authenticated name when it looks like an e-mail address, keeping only the first character of the local part and the whole domain, for example user:j***@example.com.
    Write the authenticated name as is, for example user:jane.doe@example.com.
  • Method Summary

    Modifier and Type
    Method
    Description
    static CallerMode
    Returns the enum constant of this class with the specified name.
    static CallerMode[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • DEFAULT

      public static final CallerMode DEFAULT
      Use the application-wide setting (for example logged.client-info.caller in logged-spring). This is the default value of Logged.caller(), so a method that does not set it inherits the global behavior.
    • NAME

      public static final CallerMode NAME
      Write the authenticated name as is, for example user:jane.doe@example.com. This is the library's historical behavior.
    • MASKED

      public static final CallerMode MASKED
      Mask the authenticated name when it looks like an e-mail address, keeping only the first character of the local part and the whole domain, for example user:j***@example.com. Names that are not e-mail addresses (a numeric user id, a plain username) are written unchanged.
    • CUSTOM

      public static final CallerMode CUSTOM
      Use an application-provided resolver (for example logged-spring's CallerIdentityResolver bean) to produce the identity, typically an internal user id instead of the login name.
  • Method Details

    • values

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