-
Spring-security framework comes with tooling (MockMvc post-processors and WebTestClient mutators) to unit-test secured |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
In addition to MockMvc post-processors and WebTestClient mutators, this lib exposes test annotations to populate test security-context with spring default OAuth2 Those test annotation work outside of a request context and allow to test security rules on any kind of @component. This is demoed for a |
Beta Was this translation helpful? Give feedback.
In addition to MockMvc post-processors and WebTestClient mutators, this lib exposes test annotations to populate test security-context with spring default OAuth2
Authentication
implementations plus a few others.Those test annotation work outside of a request context and allow to test security rules on any kind of @component. This is demoed for a
@Service
and a@Repository
in every sample, so please refer to projects insample
module to see how to define such tests