Package io.jmix.securityoauth2.event
Class BeforeInvocationEvent
java.lang.Object
java.util.EventObject
org.springframework.context.ApplicationEvent
io.jmix.securityoauth2.event.BeforeInvocationEvent
- All Implemented Interfaces:
Serializable
public class BeforeInvocationEvent
extends org.springframework.context.ApplicationEvent
Event fired before an API call.
Event listeners can prevent a controller invocation using
preventInvocation()
method.- See Also:
-
Field Summary
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorDescriptionBeforeInvocationEvent
(org.springframework.security.core.Authentication authentication, javax.servlet.ServletRequest request, javax.servlet.ServletResponse response) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.core.Authentication
int
javax.servlet.ServletRequest
javax.servlet.ServletResponse
org.springframework.security.core.Authentication
boolean
void
void
setErrorCode
(int errorCode) void
setErrorMessage
(String errorMessage) Methods inherited from class org.springframework.context.ApplicationEvent
getTimestamp
Methods inherited from class java.util.EventObject
toString
-
Constructor Details
-
BeforeInvocationEvent
public BeforeInvocationEvent(org.springframework.security.core.Authentication authentication, javax.servlet.ServletRequest request, javax.servlet.ServletResponse response)
-
-
Method Details
-
getSource
public org.springframework.security.core.Authentication getSource()- Overrides:
getSource
in classEventObject
-
getAuthentication
public org.springframework.security.core.Authentication getAuthentication() -
getRequest
public javax.servlet.ServletRequest getRequest() -
getResponse
public javax.servlet.ServletResponse getResponse() -
isInvocationPrevented
public boolean isInvocationPrevented() -
preventInvocation
public void preventInvocation() -
getErrorCode
public int getErrorCode() -
setErrorCode
public void setErrorCode(int errorCode) -
getErrorMessage
-
setErrorMessage
-