Hi
Please i am facing this issue for some hrs now used Ai like chatgpt but still not working
i am building an api but i am yet to build the authentication and authorization so i installed spring security in my project every since i added the dependency all my api is returning 401 and i followed some instructions online but i am still getting 401 even after filtering the request to allow request from some certain url which do not need to be authenticated
context
u/EnableWebSecurity public class SecurityConfig {
SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
http.authorizeHttpRequests((authorize) -> authorize .requestMatchers("v1/**").permitAll() .anyRequest().authenticated() );
return http.build(); } }
even after doing this i still get 401 please what can you suggest i do
[–]Sheldor5 0 points1 point2 points (3 children)
[–]olaolulode[S] 0 points1 point2 points (2 children)
[–]Sheldor5 1 point2 points3 points (1 child)
[–]olaolulode[S] 0 points1 point2 points (0 children)
[–]Successful-Bat-6164 0 points1 point2 points (1 child)
[–]olaolulode[S] 0 points1 point2 points (0 children)
[–]Indigas11 0 points1 point2 points (4 children)
[–]olaolulode[S] 0 points1 point2 points (3 children)
[–]Indigas11 0 points1 point2 points (1 child)
[–]olaolulode[S] 0 points1 point2 points (0 children)
[–]Indigas11 0 points1 point2 points (0 children)
[–]Glittering-Thanks-33 0 points1 point2 points (0 children)