Class SecurityContextChangedEvent
- java.lang.Object
-
- java.util.EventObject
-
- org.springframework.context.ApplicationEvent
-
- org.springframework.security.core.context.SecurityContextChangedEvent
-
- All Implemented Interfaces:
java.io.Serializable
public class SecurityContextChangedEvent extends org.springframework.context.ApplicationEvent
An event that represents a change inSecurityContext
- Since:
- 5.6
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SecurityContextChangedEvent(SecurityContext oldContext, SecurityContext newContext)
Construct an event
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SecurityContext
getNewContext()
Get theSecurityContext
set on theSecurityContextHolder
as of this eventSecurityContext
getOldContext()
Get theSecurityContext
set on theSecurityContextHolder
immediately previous to this event
-
-
-
Constructor Detail
-
SecurityContextChangedEvent
public SecurityContextChangedEvent(SecurityContext oldContext, SecurityContext newContext)
Construct an event- Parameters:
oldContext
- the old security contextnewContext
- the new security context
-
-
Method Detail
-
getOldContext
public SecurityContext getOldContext()
Get theSecurityContext
set on theSecurityContextHolder
immediately previous to this event- Returns:
- the previous
SecurityContext
-
getNewContext
public SecurityContext getNewContext()
Get theSecurityContext
set on theSecurityContextHolder
as of this event- Returns:
- the current
SecurityContext
-
-