- Добавил аутентификацию с помощью Spring Security.

- Реализовал кастомные  CustomUserDetails и CustomUserDetailsService

https://www.youtube.com/watch?v=WDlifgLS8iQ&list=PLU2ftbIeotGoGSEUf54LQH-DgiQPF2XRO&index=3
https://spring.io/guides/gs/securing-web
https://medium.com/@CodeWithTech/spring-security-with-jdbcuserdetailsmanager-and-custom-userdetailsservice-a-complete-guide-248ddce0196c
This commit is contained in:
Leonid
2025-02-06 23:11:24 +03:00
parent 7583c00749
commit 42a1b7466b
17 changed files with 358 additions and 24 deletions

View File

@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Spring Security Example </title>
</head>
<body>
Registration page
<br>
{{#message}}
{{message}}
{{/message}}
<form action="/registration" method="post">
<div><label> User Name : <input type="text" name="username"/> </label></div>
<div><label> Password: <input type="password" name="password"/> </label></div>
<div><input type="submit" value="Add user"/></div>
<input type="hidden" name="_csrf" value="{{_csrf.token}}" />
</form>
</body>
</html>