Spring Security 5.1 provides a number of new features. Below are the highlights of the release.
Chapter 11, Testing Method Security
SecurityContext
is setup in the test
For example, @WithMockUser(setupBefore = TestExecutionEvent.TEST_EXECUTION)
will setup a user after JUnit’s @Before
and before the test executes.
@WithUserDetails
now works with ReactiveUserDetailsService
BadCredentialsException
Section 39.3, “@AuthenticationPrincipal”
errorOnInvalidType
in WebFlux (was already supported in Spring MVC)