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.ApplicationEventAn 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 SecurityContextgetNewContext()Get theSecurityContextset on theSecurityContextHolderas of this eventSecurityContextgetOldContext()Get theSecurityContextset on theSecurityContextHolderimmediately 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 theSecurityContextset on theSecurityContextHolderimmediately previous to this event- Returns:
- the previous
SecurityContext
-
getNewContext
public SecurityContext getNewContext()
Get theSecurityContextset on theSecurityContextHolderas of this event- Returns:
- the current
SecurityContext
-
-