Class SecurityEvent

java.lang.Object
java.util.EventObject
io.micronaut.context.event.ApplicationEvent
io.micronaut.security.event.SecurityEvent
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
LoginFailedEvent, LoginSuccessfulEvent, LogoutEvent, TokenValidatedEvent

@Internal public abstract class SecurityEvent extends io.micronaut.context.event.ApplicationEvent
Base class for security events.
Since:
4.7.0
Author:
Tim Yates
See Also:
  • Constructor Details

    • SecurityEvent

      protected SecurityEvent(Object source, @Nullable @Nullable String host, Locale locale)
      Parameters:
      source - The source of the event
      host - The hostname from the request if available
      locale - The locale of the request
  • Method Details

    • getHost

      public Optional<String> getHost()
      Returns:
      The hostname from the request if available
    • getLocale

      public Locale getLocale()
      Returns:
      The locale of the request