package com.koobietech.eas.security.exception;

import com.koobietech.eas.common.utils.ResponseManager;
import org.springframework.security.access.AccessDeniedException;
import org.springframework.security.web.access.AccessDeniedHandler;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author lc
 */
public class EasAuthenticationFailureHandler implements AccessDeniedHandler {
    @Override
    public void handle(HttpServletRequest request,
                       HttpServletResponse response,
                       AccessDeniedException accessException) {
        ResponseManager.printResponse(response, "您无权操作!", 403);
    }
}