Describe the bug
The security documentation has a 'samples' chapter: https://docs.spring.io/spring-security/reference/samples.html
This references to 'https://github.com/spring-projects/spring-security/tree/5.4.x/samples' which seems to hold outdated samples. There is a '6.1.x' branch. Interestingly enough, this branch does not contain the 'samples' directory. 5.4.x was the last one to contain this directory. If this was the reason to choose this branch, then consider my bugreport to be about 'Why are there no current samples?'
To Reproduce https://docs.spring.io/spring-security/reference/samples.html
Expected behavior Samples for the selected/appropriate version of Spring Security
I believe the complexity of Spring security and multitude of way to configure things make it even more important to have a carefully curated set of samples with the latest best-practice all the time. It aligns with my experience from my job and daily contact with others in the context of Spring security, that many do now know was the 'recommended' way is. Often using the older (WebSecurityConfigurerAdapter) approaches or mixing lambda with non-lambda approaches.
I believe any definition of one for a release of Spring Security should contain a set of samples that are always curated and follow the recommended practice at this time. These samples do not need to be exhaustive, should probably contain samples for BasicAuth, including/expluding paths, customer Users, maybe OAuth2 and maybe one or two more things.
The advanced topics can have examples as well, but then need to be either commented (e.g. in the code) that they might not always follow the latest recommended practices or be equally re-evaluated and updated each minor/major release.
Comment From: filpano
This seems to be a pretty deep issue, unfortunately. In the 5.8 documentation on using a custom AuthorizationManager (the newest authorization entrypoint), the docs reference a blog article with broken formatting from 2009 (!!).