-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecated example, All of the site is protected, not just the API. #22
Comments
I am using 2.7.1 as the spring-boot-starter-parent version and adding this:
The filterchain is built like this:
Now it works as intended for static content at / and the service at /heroes. I have a POST service at /hero/add. That is still denied by CORS, which I understand is probably because my filterchain is not properly configured. Still, how can I get it to work with the latest spring version? |
👋 hi @magwas, thanks for raising this. The
Are you referring to Spring Boot 2 latest or Spring Boot 3 latest? I'll have more info soon about Spring Boot 3, but for Spring Boot 2 you should be able to use With regards to the whole site being protected, it looks like you solved this by adding the |
Let's move the Spring Boot 3 / Spring Security 6 discussion to #25 |
The following had some problems:
authorizeRequests is deprecated,
mvcMatchers is undefined.
Relevant parts of pom.xml:
Now my SecurityConfig looks like below. No kidding. jwtDecoder commented out, and all-permitting filterchain. I even deleted AudienceValidator. I am running the server with jetty. All of the urls are 401 by default, and work as expected if I add the Authorization header as described here: https://auth0.com/docs/quickstart/backend/java-spring-security5/02-using
I could have code or config left from earlier tries, however I made every effort not to, and triple-checked all places suspect. (everything WEB-INF or resources, files ending in xml)
The text was updated successfully, but these errors were encountered: