spring icon indicating copy to clipboard operation
spring copied to clipboard

@AnonymousAllowed don't working

Open jrutke opened this issue 3 years ago • 3 comments

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 {

jrutke avatar Aug 06 '22 21:08 jrutke

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.

caalador avatar Aug 08 '22 08:08 caalador

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

jrutke avatar Aug 08 '22 13:08 jrutke

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

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

caalador avatar Aug 09 '22 05:08 caalador

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

mshabarov avatar Sep 16 '22 12:09 mshabarov