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

com.luues.security.core.authentication.AccessDeniedHandler Maven / Gradle / Ivy

package com.luues.security.core.authentication;

import com.luues.security.core.invoke.SecurityInvoke;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.AccessDeniedException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * 无权限 403
 */
public class AccessDeniedHandler implements org.springframework.security.web.access.AccessDeniedHandler {

    @Autowired
    private SecurityInvoke securityInvoke;

    @Override
    public void handle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, AccessDeniedException e) throws IOException, ServletException {
        securityInvoke.onForbidden(httpServletRequest, httpServletResponse, e);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy