Add Spring Security Sample
Fixes gh-68
This commit is contained in:
5
samples/security/src/main/webapp/assets/bootstrap.min.css
vendored
Normal file
5
samples/security/src/main/webapp/assets/bootstrap.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
32
samples/security/src/main/webapp/index.jsp
Normal file
32
samples/security/src/main/webapp/index.jsp
Normal file
@@ -0,0 +1,32 @@
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Secured Content</title>
|
||||
<link rel="stylesheet" href="assets/bootstrap.min.css">
|
||||
<style type="text/css">
|
||||
body {
|
||||
padding: 1em;
|
||||
}
|
||||
#un {
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>Description</h1>
|
||||
<p>This demonstrates how Spring Session can be combined with Spring Security. The important thing to ensure is that Spring Session's Filter is included before Spring Security's Filter.</p>
|
||||
|
||||
<h1>Logged in as</h1>
|
||||
|
||||
<p>You are currently logged in as <span id="un"><c:out value="${pageContext.request.remoteUser}"/></span>.</p>
|
||||
|
||||
<c:url value="/logout" var="logoutUrl"/>
|
||||
<form action="${logoutUrl}" method="post">
|
||||
<input type="submit" value="Log Out"/>
|
||||
<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user