Class SecurityContextChangedEvent

  • All Implemented Interfaces:
    java.io.Serializable

    public class SecurityContextChangedEvent
    extends org.springframework.context.ApplicationEvent
    An event that represents a change in SecurityContext
    Since:
    5.6
    See Also:
    Serialized Form
    • Field Detail

      • NO_CONTEXT

        public static final java.util.function.Supplier<SecurityContext> NO_CONTEXT
    • Constructor Detail

      • SecurityContextChangedEvent

        public SecurityContextChangedEvent​(java.util.function.Supplier<SecurityContext> oldContext,
                                           java.util.function.Supplier<SecurityContext> newContext)
        Construct an event
        Parameters:
        oldContext - the old security context
        newContext - the new security context, use NO_CONTEXT for if the context is cleared
        Since:
        5.8
      • SecurityContextChangedEvent

        public SecurityContextChangedEvent​(SecurityContext oldContext,
                                           SecurityContext newContext)
        Construct an event
        Parameters:
        oldContext - the old security context
        newContext - the new security context