ANKIETA - https://tinyurl.com/w5st7fq
- Wyślij proszę maila na [email protected]
- Repozytorium https://github.com/rjozefowicz/spring-security
- Prezentacja https://s3.eu-central-1.amazonaws.com/jozefowicz.dev/prezentacja.pdf
DEBUG logs
logging.level.org.springframework.security=DEBUG
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<title>Login page</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
</head>
<body>
<h1>Login page</h1>
<form th:action="@{/login}" method="post" style="width: 200px">
<div th:if="${param.loggedOut}" class="alert alert-info">
You have been logged out
</div>
<div class="form-group">
<label for="username">Username</label>:
<input class="form-control" type="text" id="username" name="username" autofocus="autofocus"/> <br/>
</div>
<div class="form-group">
<label for="password">Password</label>:
<input class="form-control" type="password" id="password" name="password"/> <br/>
</div>
<input type="submit" value="Log in" class="btn btn-primary"/>
</form>
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"
integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa"
crossorigin="anonymous"></script>
</body>
</html>
index.html logout button
<form th:action="@{/doLogout}" method="post">
<input th:type="submit" class="btn btn-primary" th:value="Logout"/>
</form>
InternalSystemAuthenticationProvider:
private boolean internalSystemUser(String username) {
return nonNull(username) && username.startsWith("agx");
}
View X.509 certificate details:
openssl x509 -in client.crt -text -noout
Ważne linki
Instrukcje: