Package ubic.gemma.rest.providers
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'sAccessDeniedException
to a 403 Forbidden response.
-
-
Field Summary
-
Fields inherited from class ubic.gemma.rest.providers.AbstractExceptionMapper
log
-
-
Constructor Summary
Constructors Constructor Description AccessDeniedExceptionMapper(String hostUrl, io.swagger.v3.oas.models.OpenAPI spec, BuildInfo buildInfo)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected javax.ws.rs.core.Response.Status
getStatus(org.springframework.security.access.AccessDeniedException exception)
Translate the exception to an HTTPResponse.Status
.-
Methods inherited from class ubic.gemma.rest.providers.AbstractExceptionMapper
getResponseBuilder, getWellComposedErrorBody, logException, toResponse
-
-
-
-
Constructor Detail
-
AccessDeniedExceptionMapper
@Autowired public AccessDeniedExceptionMapper(@Value("${gemma.hosturl}") String hostUrl, io.swagger.v3.oas.models.OpenAPI spec, BuildInfo buildInfo)
-
-
Method Detail
-
getStatus
protected javax.ws.rs.core.Response.Status getStatus(org.springframework.security.access.AccessDeniedException exception)
Description copied from class:AbstractExceptionMapper
Translate the exception to an HTTPResponse.Status
.- Specified by:
getStatus
in classAbstractExceptionMapper<org.springframework.security.access.AccessDeniedException>
-
-