- Добавил аутентификацию с помощью 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:
20
src/main/resources/templates/registration.mustache
Normal file
20
src/main/resources/templates/registration.mustache
Normal 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>
|
||||
Reference in New Issue
Block a user