diff --git a/sandbox/heavyduty/build.gradle b/sandbox/heavyduty/build.gradle deleted file mode 100644 index 4533d90ba4..0000000000 --- a/sandbox/heavyduty/build.gradle +++ /dev/null @@ -1,43 +0,0 @@ -apply: 'war' -apply: 'jetty' -//apply: 'project-reports' - -version = '3.1.0.CI-SNAPSHOT' -springVersion = '3.0.1.RELEASE' -targetCompatibility = '1.5' -sourceCompatibility = '1.5' - -repositories { - mavenRepo name:'Local', urls: "file://" + System.properties['user.home'] + "/.m2/repository" -} - -dependencies { - compile 'aopalliance:aopalliance:1.0', - "org.springframework.security:spring-security-core:$version", - "org.springframework.security:spring-security-web:$version", - "org.springframework:spring-beans:$springVersion", - "org.springframework:spring-core:$springVersion", - "org.springframework:spring-context:$springVersion", - "org.springframework:spring-tx:$springVersion", - "org.springframework:spring-web:$springVersion", - "org.springframework:spring-webmvc:$springVersion", - 'org.aspectj:aspectjrt:1.6.8', - 'org.hibernate:ejb3-persistence:1.0.2.GA', - "org.eclipse.persistence:javax.persistence:$javaPersistenceVersion", - 'org.slf4j:jcl-over-slf4j:1.5.11' - - providedCompile "javax.servlet:javax.servlet-api:$servletApiVersion" - - runtime 'org.hibernate:hibernate-entitymanager:3.4.0.GA', - "org.springframework:spring-context-support:$springVersion", - "org.springframework.security:spring-security-ldap:$version", - "org.springframework.security:spring-security-config:$version", - "org.springframework.security:spring-security-taglibs:$version", - "org.springframework:spring-orm:$springVersion", - 'org.apache.directory.server:apacheds-core:1.5.5', - 'org.apache.directory.server:apacheds-server-jndi:1.5.5', - 'org.freemarker:freemarker:2.3.16', - "org.hsqldb:hsqldb:$hsqlVersion", - 'org.slf4j:slf4j-log4j12:1.5.11', - 'log4j:log4j:1.2.14' -} diff --git a/sandbox/heavyduty/certificates/Readme.txt b/sandbox/heavyduty/certificates/Readme.txt deleted file mode 100755 index 64b415cf83..0000000000 --- a/sandbox/heavyduty/certificates/Readme.txt +++ /dev/null @@ -1,10 +0,0 @@ -This directory contains certificates and keys for use with SSL in the sample applications. Certificates are issued by -our "Spring Security Test CA" certificate authority. - -ca.pem - the certificate authority's certificate. -server.jks - Java keystore containing the server certificate and privatekey. It Also contains the certificate authority - file and this is used as both keystore and truststore for they jetty server when running the samples with - the maven jetty plugin ("mvn jetty:run"). - -rod.p12, dianne.p12, scott.p12 are all certificate/key combinations for client authentication and can be installed in -your browser if you want to try out support for X.509 authentication. \ No newline at end of file diff --git a/sandbox/heavyduty/certificates/ca.pem b/sandbox/heavyduty/certificates/ca.pem deleted file mode 100755 index a5b52ca9d7..0000000000 --- a/sandbox/heavyduty/certificates/ca.pem +++ /dev/null @@ -1,22 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDojCCAoqgAwIBAgIEMKX1dzANBgkqhkiG9w0BAQUFADCBiTELMAkGA1UEBhMC -R0IxETAPBgNVBAgTCFNjb3RsYW5kMRAwDgYDVQQHEwdHbGFzZ293MRkwFwYDVQQK -ExBTcHJpbmcgRnJhbWV3b3JrMRgwFgYDVQQLEw9TcHJpbmcgU2VjdXJpdHkxIDAe -BgNVBAMTF1NwcmluZyBTZWN1cml0eSBUZXN0IENBMB4XDTA4MDEyNTExMTIyMVoX -DTE4MDIyNTAwMDAwMFowgYkxCzAJBgNVBAYTAkdCMREwDwYDVQQIEwhTY290bGFu -ZDEQMA4GA1UEBxMHR2xhc2dvdzEZMBcGA1UEChMQU3ByaW5nIEZyYW1ld29yazEY -MBYGA1UECxMPU3ByaW5nIFNlY3VyaXR5MSAwHgYDVQQDExdTcHJpbmcgU2VjdXJp -dHkgVGVzdCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALzl/wEe -snYrwqaGZuB8hmwACtptazh1+eXCfd66FkioxlLF7yTnjCC7DT+vmMgSuThIEIsN -xlxLpEgyU3bU8GIuR8wyYIyvuSMcptdFJLV7NKYuRycxpDuqimTM7Br0nfNgKVEv -1QwguGWr6YN3aZ68/xe/D5xyPhakKu++7VFXIXw9f0+nqojdrFTqQ6l9GAVRgfX6 -h4JOaV1VFx83y2pnFj0iFneVxRcvXyWnyXlcOvJDIyVuyS/hYxb+E5rtBvp5XQ0o -5CP4OMwCZGx/jEqlL8oO7BwEgu9aEBxKvoIKJmHDTHgWIxgawTrKabmong4utnMI -yNrhsI77bmh2U7UCAwEAAaMQMA4wDAYDVR0PBAUDAwcGADANBgkqhkiG9w0BAQUF -AAOCAQEAuD8W9Ukkfyi0y65mwguFVAqBC3RSTMRXcjbLQV4rMDM/Q9kjA6acY4Ta -WgxGTwNCydqaqwDVsmn+6Je8Lp2xm9KLDLypVdNopGs+Mlfo55dhwqymXkQw1oJI -CPhR3nBmGEnSWW0UY9bPlpxRF2D5GDVwpuxDtXvWa4baPwRRI9MxwPWHA3ITl+fc -s9QVKy+pRAnuP9MSIp755cJ1CODOn2ElNCqnxxsZmcWcmI3LkHAwTmegl3PVvhrk -MKMEA/neshh/M/hWGNTFt77Hoa7pU9dv5RCWFvZPqsUgPrwGrmUvcmSDir3lSWQm -SuSED2LKVo+BFqwWS+jp49AR9b8B/Q== ------END CERTIFICATE----- diff --git a/sandbox/heavyduty/certificates/dianne.p12 b/sandbox/heavyduty/certificates/dianne.p12 deleted file mode 100755 index 6e5ba218db..0000000000 Binary files a/sandbox/heavyduty/certificates/dianne.p12 and /dev/null differ diff --git a/sandbox/heavyduty/certificates/rod.p12 b/sandbox/heavyduty/certificates/rod.p12 deleted file mode 100755 index 4cd0564430..0000000000 Binary files a/sandbox/heavyduty/certificates/rod.p12 and /dev/null differ diff --git a/sandbox/heavyduty/certificates/scott.p12 b/sandbox/heavyduty/certificates/scott.p12 deleted file mode 100755 index f0a6357e73..0000000000 Binary files a/sandbox/heavyduty/certificates/scott.p12 and /dev/null differ diff --git a/sandbox/heavyduty/certificates/server.jks b/sandbox/heavyduty/certificates/server.jks deleted file mode 100755 index f56cf2e837..0000000000 Binary files a/sandbox/heavyduty/certificates/server.jks and /dev/null differ diff --git a/sandbox/heavyduty/jetty-jmx.xml b/sandbox/heavyduty/jetty-jmx.xml deleted file mode 100644 index f109d6c233..0000000000 --- a/sandbox/heavyduty/jetty-jmx.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sandbox/heavyduty/src/main/java/bigbank/Account.java b/sandbox/heavyduty/src/main/java/bigbank/Account.java deleted file mode 100755 index 989eb25c47..0000000000 --- a/sandbox/heavyduty/src/main/java/bigbank/Account.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright 2002-2016 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package bigbank; - -/** - * Note this class does not represent best practice, as we are failing to - * encapsulate business logic (methods) and state in the domain object. - * Nevertheless, this demo is intended to reflect what people usually do, - * as opposed to what they ideally would be doing. - * - * @author Ben Alex - */ -public class Account { - private long id = -1; - private String holder; - private double balance; - - public Account(String holder) { - super(); - this.holder = holder; - } - - public long getId() { - return id; - } - - public void setId(long id) { - this.id = id; - } - - public String getHolder() { - return holder; - } - - public void setHolder(String holder) { - this.holder = holder; - } - - public double getBalance() { - return balance; - } - - public void setBalance(double balance) { - this.balance = balance; - } - - public String toString() { - return "Account[id=" + id + ",balance=" + balance +",holder=" + holder + "]"; - } - - -} diff --git a/sandbox/heavyduty/src/main/java/bigbank/BankDao.java b/sandbox/heavyduty/src/main/java/bigbank/BankDao.java deleted file mode 100755 index aaa3aa79a3..0000000000 --- a/sandbox/heavyduty/src/main/java/bigbank/BankDao.java +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright 2002-2016 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package bigbank; - -public interface BankDao { - public Account readAccount(Long id); - public void createOrUpdateAccount(Account account); - public Account[] findAccounts(); -} diff --git a/sandbox/heavyduty/src/main/java/bigbank/BankDaoStub.java b/sandbox/heavyduty/src/main/java/bigbank/BankDaoStub.java deleted file mode 100755 index b38651878b..0000000000 --- a/sandbox/heavyduty/src/main/java/bigbank/BankDaoStub.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2002-2016 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package bigbank; - -import java.util.HashMap; -import java.util.Map; - -public class BankDaoStub implements BankDao { - private long id = 0; - private Map accounts = new HashMap(); - - public void createOrUpdateAccount(Account account) { - if (account.getId() == -1) { - id++; - account.setId(id); - } - accounts.put(new Long(account.getId()), account); - System.out.println("SAVE: " + account); - } - - public Account[] findAccounts() { - Account[] a = (Account[]) accounts.values().toArray(new Account[] {}); - System.out.println("Returning " + a.length + " account(s):"); - for (int i = 0; i < a.length; i++) { - System.out.println(" > " + a[i]); - } - return a; - } - - public Account readAccount(Long id) { - return (Account) accounts.get(id); - } - -} diff --git a/sandbox/heavyduty/src/main/java/bigbank/BankService.java b/sandbox/heavyduty/src/main/java/bigbank/BankService.java deleted file mode 100755 index 2bcc8ce895..0000000000 --- a/sandbox/heavyduty/src/main/java/bigbank/BankService.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2002-2016 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package bigbank; - -import org.springframework.security.access.annotation.Secured; - -public interface BankService { - - @Secured("IS_AUTHENTICATED_ANONYMOUSLY") - public Account readAccount(Long id); - - @Secured("IS_AUTHENTICATED_ANONYMOUSLY") - public Account[] findAccounts(); - - @Secured("ROLE_TELLER") - public Account post(Account account, double amount); -} diff --git a/sandbox/heavyduty/src/main/java/bigbank/BankServiceImpl.java b/sandbox/heavyduty/src/main/java/bigbank/BankServiceImpl.java deleted file mode 100755 index e8bf91acfa..0000000000 --- a/sandbox/heavyduty/src/main/java/bigbank/BankServiceImpl.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2002-2016 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package bigbank; - -import org.aspectj.lang.annotation.Pointcut; -import org.springframework.util.Assert; - -public class BankServiceImpl implements BankService { - private BankDao bankDao; - - // Not used unless you declare a - @Pointcut("execution(* bigbank.BankServiceImpl.*(..))") - public void myPointcut() {} - - public BankServiceImpl(BankDao bankDao) { - Assert.notNull(bankDao); - this.bankDao = bankDao; - } - - public Account[] findAccounts() { - return this.bankDao.findAccounts(); - } - - public Account post(Account account, double amount) { - Assert.notNull(account); - Assert.notNull(account.getId()); - - // We read account bank from DAO so it reflects the latest balance - Account a = bankDao.readAccount(account.getId()); - if (account == null) { - throw new IllegalArgumentException("Couldn't find requested account"); - } - - a.setBalance(a.getBalance() + amount); - bankDao.createOrUpdateAccount(a); - return a; - } - - public Account readAccount(Long id) { - return bankDao.readAccount(id); - } -} diff --git a/sandbox/heavyduty/src/main/java/bigbank/SeedData.java b/sandbox/heavyduty/src/main/java/bigbank/SeedData.java deleted file mode 100755 index 319ad4a07c..0000000000 --- a/sandbox/heavyduty/src/main/java/bigbank/SeedData.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2002-2016 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package bigbank; - -import org.springframework.beans.factory.InitializingBean; -import org.springframework.util.Assert; - -public class SeedData implements InitializingBean{ - private BankDao bankDao; - - public void afterPropertiesSet() throws Exception { - Assert.notNull(bankDao); - bankDao.createOrUpdateAccount(new Account("rod")); - bankDao.createOrUpdateAccount(new Account("dianne")); - bankDao.createOrUpdateAccount(new Account("scott")); - bankDao.createOrUpdateAccount(new Account("peter")); - } - - public void setBankDao(BankDao bankDao) { - this.bankDao = bankDao; - } - -} diff --git a/sandbox/heavyduty/src/main/java/bigbank/web/ListAccounts.java b/sandbox/heavyduty/src/main/java/bigbank/web/ListAccounts.java deleted file mode 100755 index 94c942928e..0000000000 --- a/sandbox/heavyduty/src/main/java/bigbank/web/ListAccounts.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2002-2016 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package bigbank.web; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.springframework.util.Assert; -import org.springframework.web.servlet.ModelAndView; -import org.springframework.web.servlet.mvc.Controller; - -import bigbank.BankService; - -public class ListAccounts implements Controller { - - private BankService bankService; - - public ListAccounts(BankService bankService) { - Assert.notNull(bankService); - this.bankService = bankService; - } - - public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception { - // Actual business logic - ModelAndView mav = new ModelAndView("listAccounts"); - mav.addObject("accounts", bankService.findAccounts()); - return mav; - } - -} diff --git a/sandbox/heavyduty/src/main/java/bigbank/web/PostAccounts.java b/sandbox/heavyduty/src/main/java/bigbank/web/PostAccounts.java deleted file mode 100755 index 59c65bee9a..0000000000 --- a/sandbox/heavyduty/src/main/java/bigbank/web/PostAccounts.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2002-2016 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package bigbank.web; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.springframework.util.Assert; -import org.springframework.web.bind.ServletRequestUtils; -import org.springframework.web.servlet.ModelAndView; -import org.springframework.web.servlet.mvc.Controller; - -import bigbank.Account; -import bigbank.BankService; - -public class PostAccounts implements Controller { - - private BankService bankService; - - public PostAccounts(BankService bankService) { - Assert.notNull(bankService); - this.bankService = bankService; - } - - public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception { - // Security check (this is unnecessary if Spring Security is performing the authorization) -// if (!request.isUserInRole("ROLE_TELLER")) { -// throw new AccessDeniedException("You must be a teller to post transactions (Spring Security message)"); // only for Spring Security managed authentication -// } - - // Actual business logic - Long id = ServletRequestUtils.getRequiredLongParameter(request, "id"); - Double amount = ServletRequestUtils.getRequiredDoubleParameter(request, "amount"); - Account a = bankService.readAccount(id); - bankService.post(a, amount); - - return new ModelAndView("redirect:listAccounts.html"); - } - -} diff --git a/sandbox/heavyduty/src/main/java/heavyduty/security/ui/HeavyDutyAuthenticationProcessingFilter.java b/sandbox/heavyduty/src/main/java/heavyduty/security/ui/HeavyDutyAuthenticationProcessingFilter.java deleted file mode 100755 index 217a369684..0000000000 --- a/sandbox/heavyduty/src/main/java/heavyduty/security/ui/HeavyDutyAuthenticationProcessingFilter.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright 2002-2016 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package heavyduty.security.ui; - -import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter; - -public class HeavyDutyAuthenticationProcessingFilter extends UsernamePasswordAuthenticationFilter { - - -} diff --git a/sandbox/heavyduty/src/main/java/heavyduty/security/ui/HeavyDutyEntryPoint.java b/sandbox/heavyduty/src/main/java/heavyduty/security/ui/HeavyDutyEntryPoint.java deleted file mode 100755 index 0c6dcf807c..0000000000 --- a/sandbox/heavyduty/src/main/java/heavyduty/security/ui/HeavyDutyEntryPoint.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2002-2016 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package heavyduty.security.ui; - -import org.springframework.security.web.authentication.LoginUrlAuthenticationEntryPoint; - -public class HeavyDutyEntryPoint extends LoginUrlAuthenticationEntryPoint { - - - -} diff --git a/sandbox/heavyduty/src/main/java/heavyduty/web/TestMultiActionController.java b/sandbox/heavyduty/src/main/java/heavyduty/web/TestMultiActionController.java deleted file mode 100644 index a49df018e0..0000000000 --- a/sandbox/heavyduty/src/main/java/heavyduty/web/TestMultiActionController.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright 2002-2016 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package heavyduty.web; - -import java.io.IOException; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.springframework.web.bind.ServletRequestBindingException; -import org.springframework.web.servlet.ModelAndView; -import org.springframework.web.servlet.mvc.multiaction.MultiActionController; - -/** - * Reproduces SEC-830. - */ -public class TestMultiActionController extends MultiActionController { - public static final String VIEW_NAME = "multi-action-test"; - - public String login(HttpServletRequest request, HttpServletResponse response) { - return "login"; - } - - public void step1(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - String[] x = request.getParameterValues("x"); - logger.info("x= " + (x == null ? "null" : Arrays.asList(x))); - String[] y = request.getParameterValues("y"); - logger.info("y = " + (y == null ? "null" : Arrays.asList(y))); - request.getRequestDispatcher("/testMulti.htm?action=step1xtra&x=5&x=5").forward(request, response); - } - - public ModelAndView step1xtra(HttpServletRequest request, HttpServletResponse response) throws ServletRequestBindingException { - logger.info("x = " + Arrays.asList(request.getParameterValues("x"))); - return createView("step2"); - } - - public ModelAndView step2(HttpServletRequest request, HttpServletResponse response) throws ServletRequestBindingException { - return createView("step1"); - } - - private ModelAndView createView(String name) { - Map model = new HashMap(); - model.put("nextAction", name); - return new ModelAndView(VIEW_NAME, model); - } - -} - diff --git a/sandbox/heavyduty/src/main/java/sample/TestVoter.java b/sandbox/heavyduty/src/main/java/sample/TestVoter.java deleted file mode 100644 index e5346e367b..0000000000 --- a/sandbox/heavyduty/src/main/java/sample/TestVoter.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2002-2016 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package sample; - -import java.util.Collection; - -import org.aopalliance.intercept.MethodInvocation; -import org.springframework.security.access.ConfigAttribute; -import org.springframework.security.access.AccessDecisionVoter; -import org.springframework.security.core.Authentication; - -public class TestVoter implements AccessDecisionVoter { - - public boolean supports(ConfigAttribute attribute) { - return true; - } - - public boolean supports(Class clazz) { - return MethodInvocation.class.isAssignableFrom(clazz); - } - - public int vote(Authentication authentication, Object object, Collection config) { - MethodInvocation mi = (MethodInvocation) object; - - mi.getMethod().getParameterAnnotations(); - - - return ACCESS_GRANTED; - } - -} diff --git a/sandbox/heavyduty/src/main/java/sample/dao/GenericDAO.java b/sandbox/heavyduty/src/main/java/sample/dao/GenericDAO.java deleted file mode 100755 index 14cab4c3ac..0000000000 --- a/sandbox/heavyduty/src/main/java/sample/dao/GenericDAO.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright 2002-2016 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package sample.dao; - -import java.io.Serializable; - - -/** - * The Interface GenericDAO. - */ -public interface GenericDAO -{ - /** - * persist - * @param transientInstance objet to persist - */ - void persist(T transientInstance); - - - /** - * refresh - * @param instance objet to refresh - */ - void refresh(T instance); - - - /** - * delete - * @param persistentInstance objet to delete - */ - void delete(T persistentInstance); - - - /** - * merge - * @param detachedInstance objet to merge - * @return merged object - */ - T merge(T detachedInstance); - - - /** - * read - * @param id of object to read - * @return read object - */ - T read(PK id); -} \ No newline at end of file diff --git a/sandbox/heavyduty/src/main/java/sample/dao/UserDAO.java b/sandbox/heavyduty/src/main/java/sample/dao/UserDAO.java deleted file mode 100755 index 961d8093a7..0000000000 --- a/sandbox/heavyduty/src/main/java/sample/dao/UserDAO.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2002-2016 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package sample.dao; - -import sample.domain.User; - - -/** - * The Interface PatientDAO. - */ -public interface UserDAO extends GenericDAO { - - public User findByUsername(String username); -} diff --git a/sandbox/heavyduty/src/main/java/sample/dao/impl/GenericDAOImpl.java b/sandbox/heavyduty/src/main/java/sample/dao/impl/GenericDAOImpl.java deleted file mode 100755 index 2d717cc4c8..0000000000 --- a/sandbox/heavyduty/src/main/java/sample/dao/impl/GenericDAOImpl.java +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright 2002-2016 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package sample.dao.impl; - -import java.io.Serializable; - -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import sample.dao.GenericDAO; - - -public class GenericDAOImpl - implements GenericDAO { - /** type */ - private Class type; - - /** the logger */ - private static final Log LOG = LogFactory.getLog(GenericDAOImpl.class); - - @PersistenceContext - private EntityManager entityManager; - - /** - * Minimal constructor - * - * @param t - * type POJO hibernate - */ - public GenericDAOImpl(Class t) { - this.type = t; - } - - /** - * read data - * - * @param id - * data id - * @return data - */ - public T read(PK id) { - if (id == null) { - throw new IllegalArgumentException("Id cannot be null or empty"); - } - - // find() au lieu de getReference() pour forcer l'initialisation de - // l'objet, sinon on ne recupère - // qu'un proxy non-initialisé ! - return entityManager.find(type, id); - - } - - /** - * persist data - * - * @param transientInstance - * data to persist - * @see sido.common.dao.GenericDAO#persist(T) - */ - public void persist(T transientInstance) { - if (LOG.isDebugEnabled()) { - LOG.debug("Persisting instance of " - + transientInstance.getClass().getSimpleName()); - } - entityManager.persist(transientInstance); - } - - /** - * - * attach clean - * - * @param instance - * data to attach - * @see sido.common.dao.GenericDAO#refresh(T) - */ - public void refresh(T instance) { - if (LOG.isDebugEnabled()) { - LOG.debug("refreshing instance of " - + instance.getClass().getSimpleName()); - } - entityManager.refresh(instance); - } - - /** - * delete - * - * @param persistentInstance - * data to delete - * @see sido.common.dao.GenericDAO#delete(T) - */ - public void delete(T persistentInstance) { - if (LOG.isDebugEnabled()) { - LOG.debug("deleting instance of " - + persistentInstance.getClass().getSimpleName()); - } - entityManager.remove(persistentInstance); - } - - /** - * merge - * - * @param detachedInstance - * data to merge - * @return the merged data - * @see sido.common.dao.GenericDAO#merge(T) - */ - public T merge(T detachedInstance) { - if (LOG.isDebugEnabled()) { - LOG.debug("merging instance of " - + detachedInstance.getClass().getSimpleName()); - } - return entityManager.merge(detachedInstance); - } - - /** - * @return the entityManager - */ - public EntityManager getEntityManager() { - return entityManager; - } - - -} diff --git a/sandbox/heavyduty/src/main/java/sample/dao/impl/UserDAOImpl.java b/sandbox/heavyduty/src/main/java/sample/dao/impl/UserDAOImpl.java deleted file mode 100755 index b47d103507..0000000000 --- a/sandbox/heavyduty/src/main/java/sample/dao/impl/UserDAOImpl.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2002-2016 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package sample.dao.impl; - -import org.springframework.stereotype.Repository; - -import sample.domain.User; - -/** - * UserDAOImpl - */ -@Repository -public class UserDAOImpl extends GenericDAOImpl implements - sample.dao.UserDAO { - - /** - * Required constructor - */ - public UserDAOImpl() { - super(User.class); - } - - public User findByUsername(String username) { - return (User) getEntityManager().createNamedQuery("User.findByUsername") - .setParameter("username", username).getSingleResult(); - } - - -} diff --git a/sandbox/heavyduty/src/main/java/sample/domain/User.java b/sandbox/heavyduty/src/main/java/sample/domain/User.java deleted file mode 100755 index 2b7a93e6b7..0000000000 --- a/sandbox/heavyduty/src/main/java/sample/domain/User.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright 2002-2016 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package sample.domain; - -import java.io.Serializable; -import java.util.Date; - -import javax.persistence.Basic; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.NamedQuery; - -/** - * The Class Patient. - */ -@Entity -@NamedQuery(name = "User.findByUsername", query = "from User where username= :username") -public class User implements Serializable { - - /** serialVersionUID */ - private static final long serialVersionUID = 7073017148588882593L; - - /** The id. */ - @Id - @GeneratedValue(strategy=GenerationType.IDENTITY) - private Long id; - - /** The username. */ - @Basic(optional = false) - private String username; - - /** The username. */ - @Basic(optional = false) - private String password; - - /** - * Default constructor - */ - public User() { - super(); - } - - /** - * @param username - * @param password - */ - public User(String username, String password) { - super(); - this.username = username; - this.password = password; - } - - /** - * @return the id - */ - public Long getId() { - return id; - } - - /** - * @param id the id to set - */ - public void setId(Long id) { - this.id = id; - } - - /** - * @return the username - */ - public String getUsername() { - return username; - } - - /** - * @param username the username to set - */ - public void setUsername(String username) { - this.username = username; - } - - /** - * Full constructor - * @param username - */ - public User(String username, String password, Date derniereConnexion, - String key) { - super(); - this.username = username; - } - - /** - * @return the password - */ - public String getPassword() { - return password; - } - - /** - * @param password the password to set - */ - public void setPassword(String password) { - this.password = password; - } -} diff --git a/sandbox/heavyduty/src/main/java/sample/service/UserService.java b/sandbox/heavyduty/src/main/java/sample/service/UserService.java deleted file mode 100755 index 4103e49120..0000000000 --- a/sandbox/heavyduty/src/main/java/sample/service/UserService.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright 2002-2016 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package sample.service; - -import org.springframework.security.core.userdetails.UserDetails; -import org.springframework.security.core.userdetails.UserDetailsService; - -public interface UserService extends UserDetailsService { - - /** - * Register a new User in database - * @param username - */ - public UserDetails register(String username, String password); - - - -} diff --git a/sandbox/heavyduty/src/main/java/sample/service/impl/UserServiceImpl.java b/sandbox/heavyduty/src/main/java/sample/service/impl/UserServiceImpl.java deleted file mode 100755 index 7c31690fe1..0000000000 --- a/sandbox/heavyduty/src/main/java/sample/service/impl/UserServiceImpl.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright 2002-2016 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * - */ -package sample.service.impl; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.core.AuthenticationException; -import org.springframework.security.core.authority.AuthorityUtils; -import org.springframework.security.core.userdetails.UserDetails; -import org.springframework.security.core.userdetails.UsernameNotFoundException; -import org.springframework.stereotype.Component; -import org.springframework.transaction.annotation.Transactional; - -import sample.dao.UserDAO; -import sample.domain.User; -import sample.service.UserService; - -/** - * @author A207119 - * - */ -@Component -@Transactional -public class UserServiceImpl implements UserService { - - /** The logger */ - private static final Log LOG = LogFactory.getLog(UserServiceImpl.class); - - /** The User DAO */ - @Autowired - private UserDAO userDAO = null; - - public UserDetails loadUserByUsername(String username) - throws AuthenticationException { - try { - User user = userDAO.findByUsername(username); - - return new org.springframework.security.core.userdetails.User(user - .getUsername(), user.getPassword(), true, true, true, true, - AuthorityUtils.createAuthorityList("ROLE_USER")); - } catch (Exception e) { - LOG.error(e.getMessage(), e); - throw new UsernameNotFoundException("No matching account", e); - } - } - - public UserDetails register(String username, String password) { - User user = new User(username, password); - userDAO.persist(user); - return new org.springframework.security.core.userdetails.User(user - .getUsername(), user.getPassword(), true, true, true, true, - AuthorityUtils.createAuthorityList("ROLE_USER")); - - } - - /** - * @param userDAO - * the userDAO to set - */ - public void setUserDAO(UserDAO userDAO) { - this.userDAO = userDAO; - } - -} diff --git a/sandbox/heavyduty/src/main/resources/applicationContext-business.xml b/sandbox/heavyduty/src/main/resources/applicationContext-business.xml deleted file mode 100755 index 65376beb8f..0000000000 --- a/sandbox/heavyduty/src/main/resources/applicationContext-business.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/sandbox/heavyduty/src/main/webapp/META-INF/MANIFEST.MF b/sandbox/heavyduty/src/main/webapp/META-INF/MANIFEST.MF deleted file mode 100755 index 58630c02ef..0000000000 --- a/sandbox/heavyduty/src/main/webapp/META-INF/MANIFEST.MF +++ /dev/null @@ -1,2 +0,0 @@ -Manifest-Version: 1.0 - diff --git a/sandbox/heavyduty/src/main/webapp/WEB-INF/appContext-misc.xml b/sandbox/heavyduty/src/main/webapp/WEB-INF/appContext-misc.xml deleted file mode 100755 index 506f314d55..0000000000 --- a/sandbox/heavyduty/src/main/webapp/WEB-INF/appContext-misc.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - My Realm - - - - - - - - - bigbank.BankService.post*=ROLE_SUPERVISOR - bigbank.BankService.find*=ROLE_SUPERVISOR - - - - - - - diff --git a/sandbox/heavyduty/src/main/webapp/WEB-INF/appContext-persistence.xml b/sandbox/heavyduty/src/main/webapp/WEB-INF/appContext-persistence.xml deleted file mode 100755 index 8b82eb9c20..0000000000 --- a/sandbox/heavyduty/src/main/webapp/WEB-INF/appContext-persistence.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/sandbox/heavyduty/src/main/webapp/WEB-INF/appContext-security.xml b/sandbox/heavyduty/src/main/webapp/WEB-INF/appContext-security.xml deleted file mode 100755 index e78dad3351..0000000000 --- a/sandbox/heavyduty/src/main/webapp/WEB-INF/appContext-security.xml +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sandbox/heavyduty/src/main/webapp/WEB-INF/applicationContext-acegi-security.xml b/sandbox/heavyduty/src/main/webapp/WEB-INF/applicationContext-acegi-security.xml deleted file mode 100644 index 3d7ac540e3..0000000000 --- a/sandbox/heavyduty/src/main/webapp/WEB-INF/applicationContext-acegi-security.xml +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - My Realm - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sandbox/heavyduty/src/main/webapp/WEB-INF/classes/META-INF/persistence.xml b/sandbox/heavyduty/src/main/webapp/WEB-INF/classes/META-INF/persistence.xml deleted file mode 100644 index 3f9784b418..0000000000 --- a/sandbox/heavyduty/src/main/webapp/WEB-INF/classes/META-INF/persistence.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - org.hibernate.ejb.HibernatePersistence - sample.domain.User - - - - - - - - - - - - diff --git a/sandbox/heavyduty/src/main/webapp/WEB-INF/classes/database/heavyduty b/sandbox/heavyduty/src/main/webapp/WEB-INF/classes/database/heavyduty deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sandbox/heavyduty/src/main/webapp/WEB-INF/classes/jdbc.properties b/sandbox/heavyduty/src/main/webapp/WEB-INF/classes/jdbc.properties deleted file mode 100755 index 144ced8acf..0000000000 --- a/sandbox/heavyduty/src/main/webapp/WEB-INF/classes/jdbc.properties +++ /dev/null @@ -1,8 +0,0 @@ -jpa.dialect=org.hibernate.dialect.HSQLDialect -jpa.generateDdl=true -jpa.showSql=true - -jdbc.driver=org.hsqldb.jdbcDriver -jdbc.url=jdbc:hsqldb:mem:heavyduty -jdbc.username=sa -jdbc.password= \ No newline at end of file diff --git a/sandbox/heavyduty/src/main/webapp/WEB-INF/classes/users.ldif b/sandbox/heavyduty/src/main/webapp/WEB-INF/classes/users.ldif deleted file mode 100755 index 0cf02e22ec..0000000000 --- a/sandbox/heavyduty/src/main/webapp/WEB-INF/classes/users.ldif +++ /dev/null @@ -1,60 +0,0 @@ -dn: ou=groups,dc=springframework,dc=org -objectclass: top -objectclass: organizationalUnit -ou: groups - -dn: ou=people,dc=springframework,dc=org -objectclass: top -objectclass: organizationalUnit -ou: people - -dn: uid=rod,ou=people,dc=springframework,dc=org -objectclass: top -objectclass: person -objectclass: organizationalPerson -objectclass: inetOrgPerson -cn: Rod Johnson -sn: Johnson -uid: rod -userPassword: koala - -dn: uid=dianne,ou=people,dc=springframework,dc=org -objectclass: top -objectclass: person -objectclass: organizationalPerson -objectclass: inetOrgPerson -cn: Dianne Emu -sn: Emu -uid: dianne -userPassword: emu - -dn: uid=scott,ou=people,dc=springframework,dc=org -objectclass: top -objectclass: person -objectclass: organizationalPerson -objectclass: inetOrgPerson -cn: Scott -sn: Wombat -uid: scott -userPassword: wombat - -dn: cn=user,ou=groups,dc=springframework,dc=org -objectclass: top -objectclass: groupOfNames -cn: user -member: uid=rod,ou=people,dc=springframework,dc=org -member: uid=dianne,ou=people,dc=springframework,dc=org -member: uid=scott,ou=people,dc=springframework,dc=org - -dn: cn=teller,ou=groups,dc=springframework,dc=org -objectclass: top -objectclass: groupOfNames -cn: teller -member: uid=rod,ou=people,dc=springframework,dc=org -member: dianne=rod,ou=people,dc=springframework,dc=org - -dn: cn=supervisor,ou=groups,dc=springframework,dc=org -objectclass: top -objectclass: groupOfNames -cn: supervisor -member: uid=rod,ou=people,dc=springframework,dc=org diff --git a/sandbox/heavyduty/src/main/webapp/WEB-INF/freemarker/login.ftl b/sandbox/heavyduty/src/main/webapp/WEB-INF/freemarker/login.ftl deleted file mode 100644 index af47c4b331..0000000000 --- a/sandbox/heavyduty/src/main/webapp/WEB-INF/freemarker/login.ftl +++ /dev/null @@ -1,22 +0,0 @@ - - - Spring Security Login - - - -

Spring Security Login (Freemarker)

- -
- - - - - - - -
User:
Password:
Don't ask for my password for two weeks
- -
- - - diff --git a/sandbox/heavyduty/src/main/webapp/WEB-INF/freemarker/multi-action-test.ftl b/sandbox/heavyduty/src/main/webapp/WEB-INF/freemarker/multi-action-test.ftl deleted file mode 100644 index 0c73d37961..0000000000 --- a/sandbox/heavyduty/src/main/webapp/WEB-INF/freemarker/multi-action-test.ftl +++ /dev/null @@ -1,15 +0,0 @@ - - - - MultiActionController Test - - - -
-
-
-
- -
- - \ No newline at end of file diff --git a/sandbox/heavyduty/src/main/webapp/WEB-INF/heavyduty-servlet.xml b/sandbox/heavyduty/src/main/webapp/WEB-INF/heavyduty-servlet.xml deleted file mode 100755 index 2aaaa2aac2..0000000000 --- a/sandbox/heavyduty/src/main/webapp/WEB-INF/heavyduty-servlet.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - **/testMulti.htm=testMultiController - - - - - \ No newline at end of file diff --git a/sandbox/heavyduty/src/main/webapp/WEB-INF/jsp/listAccounts.jsp b/sandbox/heavyduty/src/main/webapp/WEB-INF/jsp/listAccounts.jsp deleted file mode 100755 index 548f43f3ba..0000000000 --- a/sandbox/heavyduty/src/main/webapp/WEB-INF/jsp/listAccounts.jsp +++ /dev/null @@ -1,27 +0,0 @@ -<%@ 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/heavyduty/src/main/webapp/WEB-INF/web.xml b/sandbox/heavyduty/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index eebf0d9123..0000000000 --- a/sandbox/heavyduty/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - Spring Security Tutorial Application - - - - contextConfigLocation - - classpath:applicationContext-business.xml - /WEB-INF/appContext-persistence.xml - /WEB-INF/appContext-security.xml - - - - - log4jConfigLocation - /WEB-INF/classes/log4j.properties - - - - webAppRootKey - heavyduty.root - - - - springSecurityFilterChain - org.springframework.web.filter.DelegatingFilterProxy - - - - springSecurityFilterChain - /* - - - - org.springframework.web.util.Log4jConfigListener - - - - - org.springframework.web.context.ContextLoaderListener - - - - - org.springframework.security.web.session.HttpSessionEventPublisher - - - - - heavyduty - org.springframework.web.servlet.DispatcherServlet - 1 - - - - heavyduty - *.htm - - - - index.jsp - - - diff --git a/sandbox/heavyduty/src/main/webapp/context.jsp b/sandbox/heavyduty/src/main/webapp/context.jsp deleted file mode 100644 index f758538a4b..0000000000 --- a/sandbox/heavyduty/src/main/webapp/context.jsp +++ /dev/null @@ -1,29 +0,0 @@ -<%@page import="org.springframework.web.context.support.WebApplicationContextUtils"%> -<%@page import="org.springframework.security.ldap.authentication.LdapAuthenticationProvider"%> -<%@page import="org.springframework.security.authentication.ProviderManager"%> - - - -

Context Information Page

-

-LdapAuthenticationProvider instances:
- -<%= -WebApplicationContextUtils.getRequiredWebApplicationContext( - session.getServletContext()).getBeansOfType(LdapAuthenticationProvider.class) -%> -

- -

-Providers:
- -<%= -((ProviderManager)WebApplicationContextUtils.getRequiredWebApplicationContext( - session.getServletContext()).getBean("org.springframework.security.authenticationManager")).getProviders() %> -

- - - -

Home

- - diff --git a/sandbox/heavyduty/src/main/webapp/index.jsp b/sandbox/heavyduty/src/main/webapp/index.jsp deleted file mode 100755 index 50ce9eec80..0000000000 --- a/sandbox/heavyduty/src/main/webapp/index.jsp +++ /dev/null @@ -1,18 +0,0 @@ -<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %> - - -

HeavyDuty App Home Page

-

-Anyone can view this page. -

-

-Test multi-action controller SEC-830. -

-

-Your principal object is....: <%= request.getUserPrincipal() %> -

-

Restricted Pages ...

-

Secure page

-

Extremely secure page

- - \ No newline at end of file diff --git a/sandbox/heavyduty/src/main/webapp/login.jsp b/sandbox/heavyduty/src/main/webapp/login.jsp deleted file mode 100755 index ab4b18b060..0000000000 --- a/sandbox/heavyduty/src/main/webapp/login.jsp +++ /dev/null @@ -1,25 +0,0 @@ -<%@ taglib prefix='c' uri='http://java.sun.com/jstl/core_rt' %> -<%@ page import="org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter" %> -<%@ page import="org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter" %> -<%@ page import="org.springframework.security.core.AuthenticationException" %> - - - - CUSTOM SPRING SECURITY LOGIN - - - -

CUSTOM SPRING SECURITY LOGIN

- -
- - - - - - - -
User:
Password:
Don't ask for my password for two weeks
-
- - diff --git a/sandbox/heavyduty/src/main/webapp/secure/extreme/index.jsp b/sandbox/heavyduty/src/main/webapp/secure/extreme/index.jsp deleted file mode 100755 index 4aac84c981..0000000000 --- a/sandbox/heavyduty/src/main/webapp/secure/extreme/index.jsp +++ /dev/null @@ -1,15 +0,0 @@ -<%@ 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/heavyduty/src/main/webapp/secure/index.jsp b/sandbox/heavyduty/src/main/webapp/secure/index.jsp deleted file mode 100755 index 8edc812194..0000000000 --- a/sandbox/heavyduty/src/main/webapp/secure/index.jsp +++ /dev/null @@ -1,38 +0,0 @@ -<%@ 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' />
- -Saved Request: <%= session.getAttribute("SPRING_SECURITY_SAVED_REQUEST_KEY") %> - - -

Home -

Logout - - \ No newline at end of file diff --git a/sandbox/webflow/src/main/resources/applicationContext-business.xml b/sandbox/webflow/src/main/resources/applicationContext-business.xml deleted file mode 100644 index 65376beb8f..0000000000 --- a/sandbox/webflow/src/main/resources/applicationContext-business.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - \ 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 deleted file mode 100644 index 58630c02ef..0000000000 --- a/sandbox/webflow/src/main/webapp/META-INF/MANIFEST.MF +++ /dev/null @@ -1,2 +0,0 @@ -Manifest-Version: 1.0 - diff --git a/sandbox/webflow/src/main/webapp/WEB-INF/freemarker/form.ftl b/sandbox/webflow/src/main/webapp/WEB-INF/freemarker/form.ftl deleted file mode 100644 index 92e3e344f1..0000000000 --- a/sandbox/webflow/src/main/webapp/WEB-INF/freemarker/form.ftl +++ /dev/null @@ -1,13 +0,0 @@ - - - - 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 deleted file mode 100644 index 788e5051fc..0000000000 --- a/sandbox/webflow/src/main/webapp/WEB-INF/freemarker/login.ftl +++ /dev/null @@ -1,22 +0,0 @@ - - - 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 deleted file mode 100644 index 548f43f3ba..0000000000 --- a/sandbox/webflow/src/main/webapp/WEB-INF/jsp/listAccounts.jsp +++ /dev/null @@ -1,27 +0,0 @@ -<%@ 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 deleted file mode 100644 index 43f1ef9eec..0000000000 --- a/sandbox/webflow/src/main/webapp/WEB-INF/secure.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - \ 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 deleted file mode 100644 index 297c358d35..0000000000 --- a/sandbox/webflow/src/main/webapp/WEB-INF/security-config.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - \ 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 deleted file mode 100644 index 2291e594e4..0000000000 --- a/sandbox/webflow/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - 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 deleted file mode 100644 index 2205b387fd..0000000000 --- a/sandbox/webflow/src/main/webapp/WEB-INF/webflow-servlet.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - /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 deleted file mode 100644 index c15ad36daa..0000000000 --- a/sandbox/webflow/src/main/webapp/index.html +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 4aac84c981..0000000000 --- a/sandbox/webflow/src/main/webapp/secure/extreme/index.jsp +++ /dev/null @@ -1,15 +0,0 @@ -<%@ 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 deleted file mode 100644 index 90678e7643..0000000000 --- a/sandbox/webflow/src/main/webapp/secure/index.jsp +++ /dev/null @@ -1,36 +0,0 @@ -<%@ 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