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

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

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

import jakarta.ws.rs.core.Response;
import jakarta.ws.rs.ext.ExceptionMapper;
import jakarta.ws.rs.ext.Provider;

import org.jboss.logging.Logger;

import io.quarkus.security.AuthenticationCompletionException;

@Provider
public class AuthenticationCompletionExceptionMapper implements ExceptionMapper {

    private static final Logger log = Logger.getLogger(AuthenticationCompletionExceptionMapper.class.getName());

    @Override
    public Response toResponse(AuthenticationCompletionException ex) {
        log.debug("Authentication has failed, returning HTTP status 401");
        return Response.status(401).build();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy