Class 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 Detail

      • AccessDeniedExceptionMapper

        @Autowired
        public AccessDeniedExceptionMapper​(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 HTTP Response.Status.
        Specified by:
        getStatus in class AbstractExceptionMapper<org.springframework.security.access.AccessDeniedException>