vaadin / spring

Spring integration for Vaadin
https://vaadin.com/start
174 stars 101 forks source link

@AnonymousAllowed don't working #1040

Closed jrutke closed 1 year ago

jrutke commented 2 years ago

I have a landing page with public access. I added the @AnonymousAllowed annotation in the class, but it doesn't work, it always loads the login page.

Method configure, SecurityConfig Class: @Override protected void configure(HttpSecurity http) throws Exception { super.configure(http); setLoginView(http, LoginView.class); }

Annotation Class @PageTitle("Landing Page") @Route("card/dashboard") @AnonymousAllowed public class DashboardView extends VerticalLayout {

caalador commented 2 years ago

Could you give a sample project that shows the exception?

I took a clean project from start.vaadin.com where I set the default security to PermitAll and had AboutView as AnonymousAllowed and going to localhost:8080/about did not redirect to the login.

Also which version of Vaadin and Spring are you using.

jrutke commented 2 years ago

Could you give a sample project that shows the exception?

I took a clean project from start.vaadin.com where I set the default security to PermitAll and had AboutView as AnonymousAllowed and going to localhost:8080/about did not redirect to the login.

Also which version of Vaadin and Spring are you using.

Thank's for your time. Don't print exception, it just doesn't work.

The version I use is vaadin 23.1.2 and spring 2.7.1

caalador commented 2 years ago

I couldn't find a problem using those versions either.

Can you share a sample project setup that fails the AnonymousAllowed?

mshabarov commented 1 year ago

@jrutke please provide a sample project which reproduces the problem and reopen this ticket.