Class AccessDeniedExceptionMapper
java.lang.Object
ubic.gemma.rest.providers.AbstractExceptionMapper<org.springframework.security.access.AccessDeniedException>
ubic.gemma.rest.providers.AccessDeniedExceptionMapper
- All Implemented Interfaces:
javax.ws.rs.ext.ExceptionMapper<org.springframework.security.access.AccessDeniedException>
@Provider
@Component
public class AccessDeniedExceptionMapper
extends AbstractExceptionMapper<org.springframework.security.access.AccessDeniedException>
Map Spring Security's
AccessDeniedException to a 403 Forbidden response.-
Field Summary
Fields inherited from class AbstractExceptionMapper
log -
Constructor Summary
ConstructorsConstructorDescriptionAccessDeniedExceptionMapper(String hostUrl, io.swagger.v3.oas.models.OpenAPI spec, ubic.gemma.core.util.BuildInfo buildInfo) -
Method Summary
Modifier and TypeMethodDescriptionprotected javax.ws.rs.core.Response.StatusgetStatus(org.springframework.security.access.AccessDeniedException exception) Translate the exception to an HTTPResponse.Status.Methods inherited from class AbstractExceptionMapper
getResponseBuilder, getWellComposedErrorBody, toResponse
-
Constructor Details
-
AccessDeniedExceptionMapper
@Autowired public AccessDeniedExceptionMapper(@Value("${gemma.hosturl}") String hostUrl, io.swagger.v3.oas.models.OpenAPI spec, ubic.gemma.core.util.BuildInfo buildInfo)
-
-
Method Details
-
getStatus
protected javax.ws.rs.core.Response.Status getStatus(org.springframework.security.access.AccessDeniedException exception) Description copied from class:AbstractExceptionMapperTranslate the exception to an HTTPResponse.Status.- Specified by:
getStatusin classAbstractExceptionMapper<org.springframework.security.access.AccessDeniedException>
-