[스프링 시큐리티] access Denied : org.springframework.security.authentication.UsernamePasswordAuthenticationToken

뿌이·2022년 1월 21일
0

오류해결

목록 보기
14/53

오류 뜬 이유

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
     <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <%@taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<h1>Logout Page</h1>
<form action="/customLogout" method="post">
<input type="hidden" name="${_csrf.parameterName }" value="${_csrf.token }"/>
<button>로그아웃</button>
</form>
</body>
</html>

에서 csrf를 crsf 로 적어서...^^;;
이 오류가 뜬다면 토큰이 일치하지 않다는 뜻이므로 오타일 확률이높음!

profile
기록이 쌓이면 지식이 된다.

0개의 댓글