SPRING/chapter08_Security
view : accessError.jsp / customLogin.jsp / customLogout.jsp
GAWON
2023. 7. 13. 10:53
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<h1>Access Denied Page</h1>
<h2>${SPRING_SECURITY_403_EXCEPTION.getMessage() }</h2>
<h2>${msg }</h2>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<h1>Custom Login Page</h1>
<h2>${error }</h2>
<h2>${logout }</h2>
<form action="/login" method="post">
<div><input type="text" name="username" value="admin"></div>
<div><input type="password" name="password" value="admin"></div>
<div><input type="submit"></div>
<input type="hidden" name="${_csrf.parameterName }" value="${_csrf.token }"><!-- token은 uuid처럼 같다 -->
</form>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!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}"></div>
<button>로그 아웃</button>
</form>
</body>
</html>