Class ResourceExceptionHandler
java.lang.Object
org.trustdeck.security.authentication.handler.ResourceExceptionHandler
A resource exception handler which re-throws an AccessDeniedException.
- Author:
- Eric Wündisch and Armin Müller
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<String> accessDeniedException(org.springframework.security.access.AccessDeniedException e) Re-throw the exception from an access denied event from spring security.
-
Constructor Details
-
ResourceExceptionHandler
public ResourceExceptionHandler()
-
-
Method Details
-
accessDeniedException
@ExceptionHandler(org.springframework.security.access.AccessDeniedException.class) public org.springframework.http.ResponseEntity<String> accessDeniedException(org.springframework.security.access.AccessDeniedException e) throws org.springframework.security.access.AccessDeniedException Re-throw the exception from an access denied event from spring security. This is needed to receive the final exception in a spring context object.- Parameters:
e- the AccessDeniedException object- Returns:
- a ResponseEntity but this will never happen, since the exception is just re-thrown
- Throws:
org.springframework.security.access.AccessDeniedException- always thrown
-