diff --git a/sandbox/webflow/pom.xml b/sandbox/webflow/pom.xml new file mode 100644 index 0000000000..ea62ecd8fb --- /dev/null +++ b/sandbox/webflow/pom.xml @@ -0,0 +1,108 @@ + + 4.0.0 + + org.springframework.security + spring-security-samples-webflow + Spring Security - Webflow sample + 2.0.5-SNAPSHOT + war + + + org.springframework.security + spring-security-core + 2.0.4 + + + org.springframework.security + spring-security-core-tiger + 2.0.4 + + + org.springframework.security + spring-security-taglibs + 2.0.4 + + + org.springframework.webflow + org.springframework.webflow + 2.0.3.RELEASE + + + ognl + ognl + 2.7.3 + + + org.springframework + spring-web + 2.5.5 + + + org.springframework + spring-core + 2.5.5 + + + org.springframework + spring-context + 2.5.5 + + + org.springframework + spring-webmvc + 2.5.5 + + + javax.servlet + servlet-api + provided + 2.4 + + + org.freemarker + freemarker + runtime + 2.3.12 + + + log4j + log4j + runtime + 1.2.14 + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + 1.5 + 1.5 + + + + org.mortbay.jetty + maven-jetty-plugin + 6.1.7 + + /webflow + + + 8080 + 8443 + + + + + + + + diff --git a/sandbox/webflow/src/main/resources/applicationContext-business.xml b/sandbox/webflow/src/main/resources/applicationContext-business.xml new file mode 100644 index 0000000000..e1e21a97e4 --- /dev/null +++ b/sandbox/webflow/src/main/resources/applicationContext-business.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sandbox/webflow/src/main/webapp/META-INF/MANIFEST.MF b/sandbox/webflow/src/main/webapp/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..58630c02ef --- /dev/null +++ b/sandbox/webflow/src/main/webapp/META-INF/MANIFEST.MF @@ -0,0 +1,2 @@ +Manifest-Version: 1.0 + diff --git a/sandbox/webflow/src/main/webapp/WEB-INF/classes/log4j.properties b/sandbox/webflow/src/main/webapp/WEB-INF/classes/log4j.properties new file mode 100644 index 0000000000..9300a2e82c --- /dev/null +++ b/sandbox/webflow/src/main/webapp/WEB-INF/classes/log4j.properties @@ -0,0 +1,18 @@ +# Global logging configuration +log4j.rootLogger=DEBUG, stdout, fileout + +log4j.logger.org.springframework.security=DEBUG, stdout, fileout + +# Console output... +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout +log4j.appender.stdout.layout.conversionPattern=[%p,%c{1},%t] %m%n + +# Rolling log file output... +log4j.appender.fileout=org.apache.log4j.RollingFileAppender +log4j.appender.fileout.File=spring-security-tutorial.log +#log4j.appender.fileout.File=${webapp.root}/WEB-INF/log4j.log +log4j.appender.fileout.MaxFileSize=1024KB +log4j.appender.fileout.MaxBackupIndex=1 +log4j.appender.fileout.layout=org.apache.log4j.PatternLayout +log4j.appender.fileout.layout.conversionPattern=%d{ABSOLUTE} %5p %c{1},%t:%L - %m%n diff --git a/sandbox/webflow/src/main/webapp/WEB-INF/freemarker/form.ftl b/sandbox/webflow/src/main/webapp/WEB-INF/freemarker/form.ftl new file mode 100644 index 0000000000..92e3e344f1 --- /dev/null +++ b/sandbox/webflow/src/main/webapp/WEB-INF/freemarker/form.ftl @@ -0,0 +1,13 @@ + + + + Form + + + +
+
+ +
+ + \ No newline at end of file diff --git a/sandbox/webflow/src/main/webapp/WEB-INF/freemarker/login.ftl b/sandbox/webflow/src/main/webapp/WEB-INF/freemarker/login.ftl new file mode 100644 index 0000000000..15f43f0ec2 --- /dev/null +++ b/sandbox/webflow/src/main/webapp/WEB-INF/freemarker/login.ftl @@ -0,0 +1,22 @@ + + + Spring Security Login + + + +

Spring Security Login (Freemarker)

+ +
+ + + + + + + +
User:
Password:
Don't ask for my password for two weeks
+ +
+ + + diff --git a/sandbox/webflow/src/main/webapp/WEB-INF/jsp/listAccounts.jsp b/sandbox/webflow/src/main/webapp/WEB-INF/jsp/listAccounts.jsp new file mode 100644 index 0000000000..548f43f3ba --- /dev/null +++ b/sandbox/webflow/src/main/webapp/WEB-INF/jsp/listAccounts.jsp @@ -0,0 +1,27 @@ +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%> + +

Accounts

+ +Home3

+ + + + + + + + + + +
+ + + + + + + &amount=-20.00">-$20 + &amount=-5.00">-$5 + &amount=5.00">+$5 + &amount=20.00">+$20 +
\ No newline at end of file diff --git a/sandbox/webflow/src/main/webapp/WEB-INF/secure.xml b/sandbox/webflow/src/main/webapp/WEB-INF/secure.xml new file mode 100644 index 0000000000..f9d626eab5 --- /dev/null +++ b/sandbox/webflow/src/main/webapp/WEB-INF/secure.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sandbox/webflow/src/main/webapp/WEB-INF/security-config.xml b/sandbox/webflow/src/main/webapp/WEB-INF/security-config.xml new file mode 100644 index 0000000000..e7e709b276 --- /dev/null +++ b/sandbox/webflow/src/main/webapp/WEB-INF/security-config.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sandbox/webflow/src/main/webapp/WEB-INF/web.xml b/sandbox/webflow/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000000..af16e5b0bb --- /dev/null +++ b/sandbox/webflow/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,75 @@ + + + + + + Spring Security Tutorial Application + + + + contextConfigLocation + + /WEB-INF/security-config.xml + + + + + log4jConfigLocation + /WEB-INF/classes/log4j.properties + + + + springSecurityFilterChain + org.springframework.web.filter.DelegatingFilterProxy + + + + springSecurityFilterChain + /* + + + + + org.springframework.web.context.ContextLoaderListener + + + + + org.springframework.security.ui.session.HttpSessionEventPublisher + + + + org.springframework.web.util.Log4jConfigListener + + + + + webflow + org.springframework.web.servlet.DispatcherServlet + 1 + + + + webflow + /app/* + + + diff --git a/sandbox/webflow/src/main/webapp/WEB-INF/webflow-servlet.xml b/sandbox/webflow/src/main/webapp/WEB-INF/webflow-servlet.xml new file mode 100644 index 0000000000..553b01f7db --- /dev/null +++ b/sandbox/webflow/src/main/webapp/WEB-INF/webflow-servlet.xml @@ -0,0 +1,59 @@ + + + + + + + + /secure=flowController + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sandbox/webflow/src/main/webapp/index.html b/sandbox/webflow/src/main/webapp/index.html new file mode 100644 index 0000000000..c15ad36daa --- /dev/null +++ b/sandbox/webflow/src/main/webapp/index.html @@ -0,0 +1 @@ +Hi. I'm the index. \ No newline at end of file diff --git a/sandbox/webflow/src/main/webapp/secure/extreme/index.jsp b/sandbox/webflow/src/main/webapp/secure/extreme/index.jsp new file mode 100644 index 0000000000..93f7a17cfc --- /dev/null +++ b/sandbox/webflow/src/main/webapp/secure/extreme/index.jsp @@ -0,0 +1,15 @@ +<%@ taglib prefix="authz" uri="http://www.springframework.org/security/tags" %> + + + +

VERY Secure Page

+This is a protected page. You can only see me if you are a supervisor. + + + You have "ROLE_SUPERVISOR" (this text is surrounded by <authz:authorize> tags). + + +

Home +

Logout + + \ No newline at end of file diff --git a/sandbox/webflow/src/main/webapp/secure/index.jsp b/sandbox/webflow/src/main/webapp/secure/index.jsp new file mode 100644 index 0000000000..e44be8bcd7 --- /dev/null +++ b/sandbox/webflow/src/main/webapp/secure/index.jsp @@ -0,0 +1,36 @@ +<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %> + + + +

Secure Page

+

+This is a protected page. You can get to me if you've been remembered, +or if you've authenticated this session. +

+ + + You are a supervisor! You can therefore see the extremely secure page.

+
+ +

Properties obtained using <sec:authentication /> tag

+ + + + + + + + + + + + + + +
TagValue
<sec:authentication property='name' />
<sec:authentication property='principal.username' />
<sec:authentication property='principal.enabled' />
<sec:authentication property='principal.accountNonLocked' />
+ + +

Home +

Logout + + \ No newline at end of file