Vaadin 7.1 + Spring-Security Integration running in Tomcat Server -
im new on vaadin , spring security, want know if had complete project example of vaadin 7.1 + spring-security integration running in tomcat server (not in jetty).
vaadin 7 easy integrate spring security. should configure 2 files. first - web.xml , second 1 spring-security.xml (user credentials , security settings). small example how use base form authentification.
web.xml
<?xml version="1.0" encoding="utf-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemalocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="webapp_id" version="3.0"> <display-name>vaadin7springsecurity</display-name> <context-param> <param-name>contextconfiglocation</param-name> <param-value> /web-inf/spring/spring-security.xml </param-value> </context-param> <listener> <listener-class>org.springframework.web.context.contextloaderlistener</listener-class> </listener> <!-- filter declaration spring security --> <filter> <filter-name>springsecurityfilterchain</filter-name> <filter-class>org.springframework.web.filter.delegatingfilterproxy</filter-class> </filter> <filter-mapping> <filter-name>springsecurityfilterchain</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> </web-app>
spring-security.xml
<beans:beans xmlns="http://www.springframework.org/schema/security" xmlns:beans="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd"> <http auto-config='true'> <intercept-url pattern="/*" access="role_user" /> </http> <authentication-manager> <authentication-provider> <user-service> <user name="user" password="password" authorities="role_user" /> </user-service> </authentication-provider> </authentication-manager> </beans:beans>
for more details, how extend spring-security.xml configuration can use spring resources.
Comments
Post a Comment