Package io.jmix.authserver.event
Class AsResourceServerBeforeInvocationEvent
java.lang.Object
java.util.EventObject
org.springframework.context.ApplicationEvent
io.jmix.authserver.event.AsResourceServerBeforeInvocationEvent
- All Implemented Interfaces:
Serializable
public class AsResourceServerBeforeInvocationEvent
extends org.springframework.context.ApplicationEvent
Event fired before resource server (registered by Authorization Server add-on) 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
ConstructorDescriptionAsResourceServerBeforeInvocationEvent
(org.springframework.security.core.Authentication authentication, jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.core.Authentication
int
jakarta.servlet.ServletRequest
jakarta.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
-
AsResourceServerBeforeInvocationEvent
public AsResourceServerBeforeInvocationEvent(org.springframework.security.core.Authentication authentication, jakarta.servlet.ServletRequest request, jakarta.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 jakarta.servlet.ServletRequest getRequest() -
getResponse
public jakarta.servlet.ServletResponse getResponse() -
isInvocationPrevented
public boolean isInvocationPrevented() -
preventInvocation
public void preventInvocation() -
getErrorCode
public int getErrorCode() -
setErrorCode
public void setErrorCode(int errorCode) -
getErrorMessage
-
setErrorMessage
-