Loading tutorials
@Bean methods. It also assumes you know HTTP methods, status codes and headers. Here you will learn what happens to a request between the servlet container and your controller, and which6 min read@Bean methods. It also assumes you know what the servlet filter chain is from the previous chapter. Here you will define the bean that configures that chain for a stateless API, and learn how its rul5 min read@Bean methods, and read a SecurityFilterChain like the one from the previous chapter. It covers what happens between "a request arrives with credentials" and "the controller can ask who the caller is". You will learn the rol6 min read@Bean methods, and read Java lambdas. It also assumes you know that authentication means proving who a caller is. The previous chapters showed how a request reaches the authentication step. This chapter covers where Spring Se5 min readSessionCreationPolicy.STATELESS changes, and which mistakes show up when you switch a REST API to stateless operation. It assumes you can write a SecurityFilterChain bean (covered earlier), that you know wh6 min readauthorizeHttpRequests inside a SecurityFilterChain. It assumes you have a working filter chain bean from the earl5 min readSecurityFilterChain bean. You should know HTTP methods, cookies, and the Authorization header. By the end you will be able to decide whether a given API needs CSRF protection, and you will know how to configure it either6 min readSecurityFilterChain bean, and recognize the basic HTTP headers. You should also know the difference between authentication and authorization from earlier chapters.6 min readSecurityFilterChain bean, understand stateless sessions, and know how authorizeHttpRequests matches paths. It shows how to make your API accept JSON Web Tokens (JWTs) issued by a separate authorization server, and how to validate and map them.4 min readSecurityFilterChain bean and know how roles and authorities end up in the SecurityContext. It also assumes you are comfortable with Spring beans and annotations. URL rules decide who may reach an endpoint. Method security decides who may run a particu5 min readSecurityFilterChain bean, and read basic HTTP status codes. It also assumes you know the difference between authentication (who are you?) and authorization (what may you do?) from earlier chapters.5 min readSecurityFilterChain, either the HTTP Basic one or the JWT resource server one from earlier chapters. You should also know basic JUnit 5 and MockMvc. The goal is to turn your security rules into automated tests, so that a change to a matcher or a role name 5 min readSecurityFilterChain for a stateless API, as built in earlier chapters. You should also know how CORS, CSRF and 401/4036 min read