All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.quarkus.resteasy.runtime.ForbiddenExceptionMapper Maven / Gradle / Ivy

There is a newer version: 3.17.0
Show newest version
package io.quarkus.resteasy.runtime;

import jakarta.annotation.Priority;
import jakarta.ws.rs.Priorities;
import jakarta.ws.rs.core.Response;
import jakarta.ws.rs.ext.ExceptionMapper;
import jakarta.ws.rs.ext.Provider;

import io.quarkus.security.ForbiddenException;

/**
 * @author Michal Szynkiewicz, [email protected]
 */
@Provider
@Priority(Priorities.USER + 1)
public class ForbiddenExceptionMapper implements ExceptionMapper {

    @Override
    public Response toResponse(ForbiddenException exception) {
        return Response.status(403).build();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy