I suppose it may have something to do with the fact that not all features are supported in the current beta version as stated by Henri Sara:
Vaadin Spring is an official add-on (moving from alpha to beta at the
moment, with some API changes) that includes the core functionality of
Vaadin4Spring.
The parts of Vaadin4Spring that are not covered by the current version
of Vaadin Spring (event bus, Spring Security support, ...) will be
converted to use Vaadin Spring sometime after the beta release. More
functionality might migrate to the official add-on in future versions.
Anyway, out of curiosity regarding Spring Security (haven't used it so far) I've done a bit of research with Vaadin 7.4.3. I set the root logger on debug, added a few breakpoints (UIInitHandler:148) and noticed the following:
- the initial request is correctly handled by the
UIInitHandler and an instance of the appropriate UI is created
- immediately after the same breakpoint @
UIInitHandler:148 is triggered for the /error path and the handler is unable to resolve the UI because most likely you don't have one defined. This also made me think that an exception may be thrown but hidden somewhere in there
- looking at the logs I saw a lot of
Invalid CSRF token found for http://localhost:8080/login?v-1429092013868
So I changed a bit the ApplicationSecurity.configure(HttpSecurity http) method to http.csrf().disable().authorizeRequests().anyRequest().permitAll(); and I was able to proceed to the second screen. Now this may not be that safe from what I gathered, but it should give you a starting point.
Note: You may already know this but if you don't and it saves you some time I'm glad to share this as well, because it took me a while to figure it out. Depending on how you will setup your app security you may end up changing that method to something like below.
@Override
protected void configure(HttpSecurity http) throws Exception {
http.csrf().disable().
exceptionHandling().authenticationEntryPoint(new LoginUrlAuthenticationEntryPoint("/login")).accessDeniedPage("/accessDenied")
.and().authorizeRequests()
.antMatchers("/VAADIN/**", "/PUSH/**", "/UIDL/**","/login", "/login/**", "/error/**", "/accessDenied/**").permitAll()
.antMatchers("/authorized", "/**").fullyAuthenticated();
}