Spring Security with Vaadin – Spring form-based authentication
We will demonstrate form-based authentication in Vaadin. It's very similar to the authentication that we used in our previous recipes. We will be editing the applicationContext.xml
file. We are not creating any customized login form, we would like to use spring internal login form.
Getting ready
You have to comment the <http-basic/>
tag from the application-Context.xml
file.
How to do it...
Edit the applicationContext.xml
file as shown in the following code:
<http auto-config="true"> <intercept-url pattern="/Vaadin_Project1/**" access="ROLE_EDITOR"/> <intercept-url pattern="/Vaadin_Project1/*.*" access="ROLE_EDITOR"/> <intercept-url pattern="/**" access="ROLE_EDITOR" /> </http> <authentication-manager> <authentication-provider> <user-service> <user name="anjana" password="123456" authorities="ROLE_EDITOR" /> </user-service>...