spring-vaadin icon indicating copy to clipboard operation
spring-vaadin copied to clipboard

An Authentication object was not found in the SecurityContext

Open ghost opened this issue 10 years ago • 2 comments

When added @Push annotation to ui class and try to navigate another view i'm getting this error:

org.springframework.security.authentication.AuthenticationCredentialsNotFoundException: An Authentication object was not found in the SecurityContext
DiscoveryNavigator  securedNav = new DiscoveryNavigator(this, this);

Button click:

    DiscoveryNavigator dn = (DiscoveryNavigator) UI.getCurrent().getNavigator();
    dn.navigateTo((String) event.getButton().getData());

ghost avatar Sep 16 '14 07:09 ghost

check this out, it helped me https://vaadin.com/forum#!/thread/3383122

maslovalex avatar Sep 23 '14 10:09 maslovalex

thanks maslovalex. I solved with custom viewprovider and this one. https://github.com/michael-simons/vaadin-springsecurityviewprovider.

ghost avatar Sep 23 '14 10:09 ghost