-
Notifications
You must be signed in to change notification settings - Fork 131
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
Vaadin @Push with Vaadin4Spring Security #271
Comments
The root problem is that you are trying to access the HTTP request while using Websocket communication, during which no HTTP requests exist at all. I also noticed you are using version 0.0.6. The security part has been heavily redesigned in 0.0.7. May I suggest you try with the latest snapshot of Vaadin4Spring and see if the problem persists? |
I had a similar issue. I've an app that's pretty close to the security-sample-shared. But the 'main' and login ui's had push enabled. After hitting the main URL, and being redirected to login I'd get a flurry of XHR calls to login. Removing @Push from the LoginUI seems to have fixed the problem. |
Thank you both for your replies. As you suggested, I have upgraded to 0.0.7, separated the Login to different UI (so we have 2 Vaadin UIs, one for main application and one for the login) and removed the @Push from the LoginUI. To be more specific, I have changed it to Shared Security when upgraded to 0.0.7. Here are few side effects /issues I have realized. I appreciate if you can comment on those. a) It seems like after User login and redirected to MainUI, it is starting a new VaadinSession. It makes it not possible to share attributes between LoginUI and MainUI by getSession().setAttribute("myValue", value) and getSession().getAttribute("myValue"))) |
Here are some really quick answers, hope they help you in some way: |
Hello everyone, |
Using Vaadin @Push with vaadin-spring-boot-starter and Vaadin4Spring Security throws exception.
Here is Vaadin related dependencies on our project:
Here is the annotations on UI Class
And, Application.java ;
As soon as we call
security.login(username.getValue(), password.getValue());
(security is org.vaadin.spring.security.VaadinSecurity;)
we get the below exception;
16:36:35.272 [http-nio-8080-exec-9] ERROR c.b.g.c.s.v.views.login.LoginBox/login Login ERROR occured during login.org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.httpService': Scope 'request' is not active for the current thread; consider defining a scoped proxy for this bean if you intend to refer to it from a singleton; nested exception is java.lang.IllegalStateException: No thread-bound request found: Are you referring to request attributes outside of an actual web request, or processing a request outside of the originally receiving thread? If you are actually operating within a web request and still receive this message, your code is probably running outside of DispatcherServlet/DispatcherPortlet: In this case, use RequestContextListener or RequestContextFilter to expose the current request.
I appreciate any help you can provide.
The text was updated successfully, but these errors were encountered: