- Spring Security: Authentication and Authorization In-Depth
- Spring Security - Understanding AuthenticationProvider and creating a custom one
What Spring Security is and how its core features like authentication, authorization or common exploit protection work. Also, a comprehensive FAQ.
@Controller
public class MyController {
@GetMaping("/login")
public String login(Model model, CsrfToken token) {
// the token will be injected automatically
return "/templates/login";
}
}
https://dev.to/nicholas_moen/what-i-learned-while-using-django-with-htmx-and-alpine-js-24jg
<script>
document.body.addEventListener(
'htmx:configRequest', (event) => {
event.detail.headers['X-CSRFToken'] = '{{ csrf_token }}';
})
</script>