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.
  • 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: AbstractExceptionMapper
      Translate the exception to an HTTP Response.Status.
      Specified by:
      getStatus in class AbstractExceptionMapper<org.springframework.security.access.AccessDeniedException>