-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement #18 - custom login, logout page
스프링 시큐리티 기본 로그인, 로그아웃 페이지를 수동 페이지로 전환 로그인, 로그아웃 기능 post url 은 시큐리티 기본 기능을 활용
- Loading branch information
Showing
6 changed files
with
68 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0"?> | ||
<thlogic> | ||
<attr sel="#loginTitle" th:text="'로그인 페이지'" /> | ||
<attr sel="#csrf" th:value="${_csrf.token}" th:name="${_csrf.parameterName}" /> | ||
<attr sel="#login" th:form="loginForm" th:formaction="@{/login}" th:formmethod="post" /> | ||
</thlogic> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!DOCTYPE html> | ||
<html lang="ko"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Title</title> | ||
</head> | ||
<body> | ||
<p> | ||
<span id="logoutTitle">This is logout page.</span> | ||
</p> | ||
<form id="logoutForm"> | ||
<input type="hidden" id="csrf"> | ||
</form> | ||
<button id="logout" type="submit">로그아웃</button> | ||
<button id="cancel" type="button">취소</button> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0"?> | ||
<thlogic> | ||
<attr sel="#logoutTitle" th:text="'로그아웃 페이지'" /> | ||
<attr sel="#csrf" th:value="${_csrf.token}" th:name="${_csrf.parameterName}" /> | ||
<attr sel="#logout" th:form="logoutForm" th:formaction="@{/logout}" th:formmethod="post" /> | ||
<attr sel="#cancel" th:onclick="'location.href=\'' + @{${backUrl}} + '\''" /> | ||
</thlogic> |