Class TestSecurityConfig
java.lang.Object
me.josephsf.jobportaljosephsfeirtest.config.TestSecurityConfig
Test configuration for security settings in integration tests.
This configuration disables CSRF protection for tests and sets up
a mock authentication context with the RECRUITER role.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.crypto.password.PasswordEncodervoidSets up a mock authentication context with a user having the RECRUITER role.org.springframework.security.web.SecurityFilterChaintestSecurityFilterChain(org.springframework.security.config.annotation.web.builders.HttpSecurity http)
-
Constructor Details
-
TestSecurityConfig
public TestSecurityConfig()
-
-
Method Details
-
testSecurityFilterChain
@Bean public org.springframework.security.web.SecurityFilterChain testSecurityFilterChain(org.springframework.security.config.annotation.web.builders.HttpSecurity http) throws Exception - Throws:
Exception
-
passwordEncoder
-
setUpRecruiterAuthentication
public void setUpRecruiterAuthentication()Sets up a mock authentication context with a user having the RECRUITER role.
-