diff --git a/samples/contacts-tiger/.cvsignore b/samples/contacts-tiger/.cvsignore deleted file mode 100644 index 2471891f5e..0000000000 --- a/samples/contacts-tiger/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -classes -dist -api -build.properties -temporary -target diff --git a/samples/contacts-tiger/maven.xml b/samples/contacts-tiger/maven.xml deleted file mode 100644 index 3e11e6696f..0000000000 --- a/samples/contacts-tiger/maven.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - The "war" goal is deprecated. Use "multiwar:multiwar" instead. - - - - - - - - - - - - - - - - - - - - - - - - multiproject:install doesn't install Contacts Samples WARs to local repo - - - - - - - - - - - diff --git a/samples/contacts-tiger/pom.xml b/samples/contacts-tiger/pom.xml deleted file mode 100644 index ab32806fd6..0000000000 --- a/samples/contacts-tiger/pom.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - 4.0.0 - - org.acegisecurity - acegi-security-samples - 1.0.5-SNAPSHOT - - acegi-security-sample-contacts-tiger - Acegi Security System for Spring - Contacts sample - war - - - org.acegisecurity - acegi-security-tiger - ${project.version} - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.5 - 1.5 - - - - - - diff --git a/samples/contacts-tiger/project.properties b/samples/contacts-tiger/project.properties deleted file mode 100644 index 57bf00899c..0000000000 --- a/samples/contacts-tiger/project.properties +++ /dev/null @@ -1,26 +0,0 @@ -# Ant properties for building the Contacts (Java 5) sample application. -# $Id$ - -name.filter=filter -src.dir=src -war.dir=war -lib.dir=${basedir}/../../lib -dist.lib.dir=${basedir}/../../dist -build.dir=classes -dist.dir=dist -javadocs.dir=api -jalopy.xml=${basedir}/../../jalopy.xml -tmp.dir=temporary -etc.dir=etc -client.dir=client - - -maven.war.src=${maven.src.dir}/main/webapp/common - -maven.multiproject.type=multiwar - -maven.xdoc.distributionType=war -maven.xdoc.distributionUrl=http://acegisecurity.sourceforge.net/maven/acegisecurity/wars - -maven.compile.target=1.5 -maven.compile.source=1.5 diff --git a/samples/contacts-tiger/project.xml b/samples/contacts-tiger/project.xml deleted file mode 100644 index 3eb9ea0b85..0000000000 --- a/samples/contacts-tiger/project.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - ${basedir}/../project.xml - 3 - acegi-security-sample-contacts-tiger - Acegi Security System for Spring - Contacts sample (Java 5) - /home/groups/a/ac/acegisecurity/htdocs/multiproject/acegi-security-sample-contacts-tiger - - scm:svn:https://acegisecurity.svn.sourceforge.net/svnroot/acegisecurity/trunk/acegisecurity - scm:svn:https://acegisecurity.svn.sourceforge.net/svnroot/acegisecurity/trunk/acegisecurity - http://acegisecurity.svn.sourceforge.net/viewcvs.cgi/acegisecurity/trunk/acegisecurity/samples/contacts-tiger/ - - - - hessian - hessian - 3.0.1 - jar - http://www.caucho.com - - true - - - - burlap - burlap - 2.1.7 - jar - http://www.caucho.com - - true - - - - org.acegisecurity - acegi-security-tiger - 1.0.4 - jar - - true - - - - - diff --git a/samples/contacts-tiger/src/main/java/sample/contact/annotation/ContactManagerBackend.java b/samples/contacts-tiger/src/main/java/sample/contact/annotation/ContactManagerBackend.java deleted file mode 100644 index 6edbea4c56..0000000000 --- a/samples/contacts-tiger/src/main/java/sample/contact/annotation/ContactManagerBackend.java +++ /dev/null @@ -1,216 +0,0 @@ -/* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited - * - * 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.contact.annotation; - -import org.acegisecurity.Authentication; - -import org.acegisecurity.acls.AccessControlEntry; -import org.acegisecurity.acls.MutableAcl; -import org.acegisecurity.acls.MutableAclService; -import org.acegisecurity.acls.NotFoundException; -import org.acegisecurity.acls.Permission; -import org.acegisecurity.acls.domain.BasePermission; -import org.acegisecurity.acls.objectidentity.ObjectIdentity; -import org.acegisecurity.acls.objectidentity.ObjectIdentityImpl; -import org.acegisecurity.acls.sid.PrincipalSid; -import org.acegisecurity.acls.sid.Sid; - -import org.acegisecurity.annotation.Secured; - -import org.acegisecurity.context.SecurityContextHolder; - -import org.acegisecurity.userdetails.UserDetails; - -import org.springframework.beans.factory.InitializingBean; - -import org.springframework.context.support.ApplicationObjectSupport; - -import org.springframework.transaction.annotation.Transactional; - -import org.springframework.util.Assert; - -import sample.contact.Contact; -import sample.contact.ContactDao; -import sample.contact.ContactManager; - -import java.util.List; -import java.util.Random; - - -/** - * Concrete implementation of Java 5 Annotated {@link ContactManager}. - * - * @author Mark St.Godard - * @version $Id$ - */ -@Transactional -public class ContactManagerBackend extends ApplicationObjectSupport implements ContactManager, InitializingBean { - //~ Instance fields ================================================================================================ - - private ContactDao contactDao; - - // TODO: Assignment of annotations against class does not result in match in sample application - private MutableAclService mutableAclService; - private int counter = 1000; - - //~ Methods ======================================================================================================== - - @Secured({"ACL_CONTACT_ADMIN"}) - public void addPermission(Contact contact, Sid recipient, Permission permission) { - MutableAcl acl; - ObjectIdentity oid = new ObjectIdentityImpl(Contact.class, contact.getId()); - - try { - acl = (MutableAcl) mutableAclService.readAclById(oid); - } catch (NotFoundException nfe) { - acl = mutableAclService.createAcl(oid); - } - - acl.insertAce(null, permission, recipient, true); - mutableAclService.updateAcl(acl); - - if (logger.isDebugEnabled()) { - logger.debug("Added permission " + permission + " for Sid " + recipient + " contact " + contact); - } - } - - public void afterPropertiesSet() throws Exception { - Assert.notNull(contactDao, "contactDao required"); - Assert.notNull(mutableAclService, "mutableAclService required"); - } - - @Secured({"ROLE_USER"}) - public void create(Contact contact) { - // Create the Contact itself - contact.setId(new Long(counter++)); - contactDao.create(contact); - - // Grant the current principal administrative permission to the contact - addPermission(contact, new PrincipalSid(getUsername()), BasePermission.ADMINISTRATION); - - if (logger.isDebugEnabled()) { - logger.debug("Created contact " + contact + " and granted admin permission to recipient " + getUsername()); - } - } - - @Secured({"ACL_CONTACT_DELETE"}) - public void delete(Contact contact) { - contactDao.delete(contact.getId()); - - // Delete the ACL information as well - ObjectIdentity oid = new ObjectIdentityImpl(Contact.class, contact.getId()); - mutableAclService.deleteAcl(oid, false); - - if (logger.isDebugEnabled()) { - logger.debug("Deleted contact " + contact + " including ACL permissions"); - } - } - - @Secured({"ACL_CONTACT_ADMIN"}) - public void deletePermission(Contact contact, Sid recipient, Permission permission) { - ObjectIdentity oid = new ObjectIdentityImpl(Contact.class, contact.getId()); - MutableAcl acl = (MutableAcl) mutableAclService.readAclById(oid); - - // Remove all permissions associated with this particular recipient (string equality to KISS) - AccessControlEntry[] entries = acl.getEntries(); - - for (int i = 0; i < entries.length; i++) { - if (entries[i].getSid().equals(recipient) && entries[i].getPermission().equals(permission)) { - acl.deleteAce(entries[i].getId()); - } - } - - mutableAclService.updateAcl(acl); - - if (logger.isDebugEnabled()) { - logger.debug("Deleted contact " + contact + " ACL permissions for recipient " + recipient); - } - } - - @Secured({"ROLE_USER", "AFTER_ACL_COLLECTION_READ"}) - @Transactional(readOnly = true) - public List getAll() { - if (logger.isDebugEnabled()) { - logger.debug("Returning all contacts"); - } - - return contactDao.findAll(); - } - - @Secured({"ROLE_USER"}) - @Transactional(readOnly = true) - public List getAllRecipients() { - if (logger.isDebugEnabled()) { - logger.debug("Returning all recipients"); - } - - List list = contactDao.findAllPrincipals(); - - return list; - } - - @Secured({"ROLE_USER", "AFTER_ACL_READ"}) - @Transactional(readOnly = true) - public Contact getById(Long id) { - if (logger.isDebugEnabled()) { - logger.debug("Returning contact with id: " + id); - } - - return contactDao.getById(id); - } - - /** - * This is a public method. - * - * @return DOCUMENT ME! - */ - public Contact getRandomContact() { - if (logger.isDebugEnabled()) { - logger.debug("Returning random contact"); - } - - Random rnd = new Random(); - List contacts = contactDao.findAll(); - int getNumber = rnd.nextInt(contacts.size()); - - return (Contact) contacts.get(getNumber); - } - - protected String getUsername() { - Authentication auth = SecurityContextHolder.getContext().getAuthentication(); - - if (auth.getPrincipal() instanceof UserDetails) { - return ((UserDetails) auth.getPrincipal()).getUsername(); - } else { - return auth.getPrincipal().toString(); - } - } - - public void setContactDao(ContactDao contactDao) { - this.contactDao = contactDao; - } - - public void setMutableAclService(MutableAclService mutableAclService) { - this.mutableAclService = mutableAclService; - } - - public void update(Contact contact) { - contactDao.update(contact); - - if (logger.isDebugEnabled()) { - logger.debug("Updated contact " + contact); - } - } -} diff --git a/samples/contacts-tiger/src/main/resources/log4j.properties b/samples/contacts-tiger/src/main/resources/log4j.properties deleted file mode 100644 index a16a75a136..0000000000 --- a/samples/contacts-tiger/src/main/resources/log4j.properties +++ /dev/null @@ -1,37 +0,0 @@ -# Global logging configuration -log4j.rootLogger=WARN, stdout, fileout - -#log4j.logger.org.springframework.aop.framework.autoproxy=DEBUG, stdout, fileout -#log4j.logger.org.springframework.aop.framework.autoproxy.metadata=DEBUG, stdout, fileout -#log4j.logger.org.springframework.aop.framework.autoproxy.target=DEBUG, stdout, fileout -#log4j.logger.org.springframework.transaction.interceptor=DEBUG, stdout, fileout -#log4j.logger.net.sf.acegisecurity.intercept=DEBUG, stdout, fileout -#log4j.logger.net.sf.acegisecurity.intercept.method=DEBUG, stdout, fileout -#log4j.logger.net.sf.acegisecurity.intercept.web=DEBUG, stdout, fileout -#log4j.logger.net.sf.acegisecurity.afterinvocation=DEBUG, stdout, fileout -#log4j.logger.net.sf.acegisecurity.acl=DEBUG, stdout, fileout -#log4j.logger.net.sf.acegisecurity.acl.basic=DEBUG, stdout, fileout -#log4j.logger.net.sf.acegisecurity.taglibs.authz=DEBUG, stdout, fileout -#log4j.logger.net.sf.acegisecurity.ui.basicauth=DEBUG, stdout, fileout -#log4j.logger.net.sf.acegisecurity.ui.rememberme=DEBUG, stdout, fileout -#log4j.logger.net.sf.acegisecurity.ui=DEBUG, stdout, fileout -#log4j.logger.net.sf.acegisecurity.afterinvocation=DEBUG, stdout, fileout -#log4j.logger.net.sf.acegisecurity.ui.rmi=DEBUG, stdout, fileout -#log4j.logger.net.sf.acegisecurity.ui.httpinvoker=DEBUG, stdout, fileout -#log4j.logger.net.sf.acegisecurity.util=DEBUG, stdout, fileout -#log4j.logger.net.sf.acegisecurity.providers.dao=DEBUG, stdout, fileout -log4j.logger.sample.contact=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=contacts.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/samples/contacts-tiger/src/main/resources/messages.properties b/samples/contacts-tiger/src/main/resources/messages.properties deleted file mode 100644 index 058905c6c1..0000000000 --- a/samples/contacts-tiger/src/main/resources/messages.properties +++ /dev/null @@ -1,6 +0,0 @@ -err.name=Name 3-50 characters is required. -err.email=Email 3-50 characters is required. -err.permission=Permission is required. -err.recipient=Recipient is required. -err.permission.invalid=The indicated permission is invalid. -err.recipient.length=The recipient is too long (maximum 100 characters). \ No newline at end of file diff --git a/samples/contacts-tiger/src/main/webapp/common/WEB-INF/.cvsignore b/samples/contacts-tiger/src/main/webapp/common/WEB-INF/.cvsignore deleted file mode 100644 index 86e9501ee1..0000000000 --- a/samples/contacts-tiger/src/main/webapp/common/WEB-INF/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -lib - diff --git a/samples/contacts-tiger/src/main/webapp/common/WEB-INF/contacts-servlet.xml b/samples/contacts-tiger/src/main/webapp/common/WEB-INF/contacts-servlet.xml deleted file mode 100644 index 3176dec545..0000000000 --- a/samples/contacts-tiger/src/main/webapp/common/WEB-INF/contacts-servlet.xml +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - messages - - - - - - - - - - - - - - - - - - - - - - - - - - - - publicIndexController - secureAddForm - secureIndexController - secureDeleteController - adminPermissionController - deletePermissionController - addPermissionForm - - - - - - - - - - true - webContact - sample.contact.WebContact - - add - index.htm - - - - - - - true - addPermission - sample.contact.AddPermission - - addPermission - index.htm - - - - - - - /WEB-INF/jsp/ - .jsp - - - diff --git a/samples/contacts-tiger/src/main/webapp/common/WEB-INF/jsp/add.jsp b/samples/contacts-tiger/src/main/webapp/common/WEB-INF/jsp/add.jsp deleted file mode 100644 index 5b14a52275..0000000000 --- a/samples/contacts-tiger/src/main/webapp/common/WEB-INF/jsp/add.jsp +++ /dev/null @@ -1,40 +0,0 @@ -<%@ include file="/WEB-INF/jsp/include.jsp" %> - -Add New Contact - -

Add Contact

-
- - - - - - - - - - - - - - - -
Name: - "> - - -
Email: - "> - - -
-
- - Please fix all errors! - -

- -
-">Home - - diff --git a/samples/contacts-tiger/src/main/webapp/common/WEB-INF/jsp/addPermission.jsp b/samples/contacts-tiger/src/main/webapp/common/WEB-INF/jsp/addPermission.jsp deleted file mode 100644 index 52c05365ec..0000000000 --- a/samples/contacts-tiger/src/main/webapp/common/WEB-INF/jsp/addPermission.jsp +++ /dev/null @@ -1,55 +0,0 @@ -<%@ include file="/WEB-INF/jsp/include.jsp" %> - -Add Permission - -

Add Permission

-
- - - - - - - - - - - - - - - - - - - -
Contact:
Recipient: - - - -
Permission: - - - -
-
- - Please fix all errors! - -

- -
-

-">Admin Permission ">Manage - - diff --git a/samples/contacts-tiger/src/main/webapp/common/WEB-INF/jsp/adminPermission.jsp b/samples/contacts-tiger/src/main/webapp/common/WEB-INF/jsp/adminPermission.jsp deleted file mode 100644 index 9f799b0ee2..0000000000 --- a/samples/contacts-tiger/src/main/webapp/common/WEB-INF/jsp/adminPermission.jsp +++ /dev/null @@ -1,28 +0,0 @@ -<%@ include file="/WEB-INF/jsp/include.jsp" %> - - -Administer Permissions - -

Administer Permissions

-

- - - -

- - - - - - - -
- - - - - ">Del -
-

">Add Permission ">Manage - - diff --git a/samples/contacts-tiger/src/main/webapp/common/WEB-INF/jsp/deletePermission.jsp b/samples/contacts-tiger/src/main/webapp/common/WEB-INF/jsp/deletePermission.jsp deleted file mode 100644 index 85a71a2b6b..0000000000 --- a/samples/contacts-tiger/src/main/webapp/common/WEB-INF/jsp/deletePermission.jsp +++ /dev/null @@ -1,20 +0,0 @@ -<%@ include file="/WEB-INF/jsp/include.jsp" %> - - -Permission Deleted - -

Permission Deleted

-

- - - -

- - - - - - -

">Manage - - diff --git a/samples/contacts-tiger/src/main/webapp/common/WEB-INF/jsp/deleted.jsp b/samples/contacts-tiger/src/main/webapp/common/WEB-INF/jsp/deleted.jsp deleted file mode 100644 index 8fed87c4fd..0000000000 --- a/samples/contacts-tiger/src/main/webapp/common/WEB-INF/jsp/deleted.jsp +++ /dev/null @@ -1,13 +0,0 @@ -<%@ include file="/WEB-INF/jsp/include.jsp" %> - - -Deletion completed - -

Deleted

-

- - - -

">Manage - - diff --git a/samples/contacts-tiger/src/main/webapp/common/WEB-INF/jsp/hello.jsp b/samples/contacts-tiger/src/main/webapp/common/WEB-INF/jsp/hello.jsp deleted file mode 100644 index 2a40c618f9..0000000000 --- a/samples/contacts-tiger/src/main/webapp/common/WEB-INF/jsp/hello.jsp +++ /dev/null @@ -1,51 +0,0 @@ -<%@ include file="/WEB-INF/jsp/include.jsp" %> - - -Contacts Security Demo - -

Contacts Security Demo

-

Contacts demonstrates the following central Acegi Security capabilities: -

- -* As the application provides an "ACL Administration" use case, those -classes are necessarily aware of security. But no business use cases are. - -

Please excuse the lack of look 'n' feel polish in this application. -It is about security, after all! :-) - -

To demonstrate a public method on ContactManager, -here's a random Contact: -

- - - -

Get started by clicking "Manage"... -

">Manage -">Debug - - diff --git a/samples/contacts-tiger/src/main/webapp/common/WEB-INF/jsp/include.jsp b/samples/contacts-tiger/src/main/webapp/common/WEB-INF/jsp/include.jsp deleted file mode 100644 index f9bcd96703..0000000000 --- a/samples/contacts-tiger/src/main/webapp/common/WEB-INF/jsp/include.jsp +++ /dev/null @@ -1,5 +0,0 @@ -<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %> -<%@ taglib prefix="authz" uri="http://acegisecurity.org/authz" %> - -<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %> diff --git a/samples/contacts-tiger/src/main/webapp/common/WEB-INF/jsp/index.jsp b/samples/contacts-tiger/src/main/webapp/common/WEB-INF/jsp/index.jsp deleted file mode 100644 index 98756513e5..0000000000 --- a/samples/contacts-tiger/src/main/webapp/common/WEB-INF/jsp/index.jsp +++ /dev/null @@ -1,32 +0,0 @@ -<%@ include file="/WEB-INF/jsp/include.jsp" %> - - -Your Contacts - -

's Contacts

-

- - - - - - - - - - - - - - - -
idNameEmail
- - - - - - ">Del">Admin Permission
-

">Add

">Logoff (also clears any remember-me cookie) - - diff --git a/samples/contacts-tiger/src/main/webapp/common/WEB-INF/remoting-servlet.xml b/samples/contacts-tiger/src/main/webapp/common/WEB-INF/remoting-servlet.xml deleted file mode 100644 index cdc2ec7171..0000000000 --- a/samples/contacts-tiger/src/main/webapp/common/WEB-INF/remoting-servlet.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - sample.contact.ContactManager - - - - - - - - - sample.contact.ContactManager - - - - - - - - - sample.contact.ContactManager - - - - diff --git a/samples/contacts-tiger/src/main/webapp/common/WEB-INF/spring.tld b/samples/contacts-tiger/src/main/webapp/common/WEB-INF/spring.tld deleted file mode 100644 index a6f7bffac6..0000000000 --- a/samples/contacts-tiger/src/main/webapp/common/WEB-INF/spring.tld +++ /dev/null @@ -1,311 +0,0 @@ - - - - - - 1.1.1 - - 1.2 - - Spring - - http://www.springframework.org/tags - - Spring Framework JSP Tag Library. Authors: Rod Johnson, Juergen Hoeller - - - - - htmlEscape - org.springframework.web.servlet.tags.HtmlEscapeTag - JSP - - - Sets default HTML escape value for the current page. - Overrides a "defaultHtmlEscape" context-param in web.xml, if any. - - - - defaultHtmlEscape - true - true - - - - - - - - escapeBody - org.springframework.web.servlet.tags.EscapeBodyTag - JSP - - - Escapes its enclosed body content, applying HTML escaping and/or JavaScript escaping. - The HTML escaping flag participates in a page-wide or application-wide setting - (i.e. by HtmlEscapeTag or a "defaultHtmlEscape" context-param in web.xml). - - - - htmlEscape - false - true - - - - javaScriptEscape - false - true - - - - - - - - message - org.springframework.web.servlet.tags.MessageTag - JSP - - - Retrieves the message with the given code, or text if code isn't resolvable. - The HTML escaping flag participates in a page-wide or application-wide setting - (i.e. by HtmlEscapeTag or a "defaultHtmlEscape" context-param in web.xml). - - - - code - false - true - - - - arguments - false - true - - - - text - false - true - - - - var - false - true - - - - scope - false - true - - - - htmlEscape - false - true - - - - javaScriptEscape - false - true - - - - - - - - theme - org.springframework.web.servlet.tags.ThemeTag - JSP - - - Retrieves the theme message with the given code, or text if code isn't resolvable. - The HTML escaping flag participates in a page-wide or application-wide setting - (i.e. by HtmlEscapeTag or a "defaultHtmlEscape" context-param in web.xml). - - - - code - false - true - - - - arguments - false - true - - - - text - false - true - - - - var - false - true - - - - scope - false - true - - - - htmlEscape - false - true - - - - javaScriptEscape - false - true - - - - - - - - hasBindErrors - org.springframework.web.servlet.tags.BindErrorsTag - JSP - - - Provides Errors instance in case of bind errors. - The HTML escaping flag participates in a page-wide or application-wide setting - (i.e. by HtmlEscapeTag or a "defaultHtmlEscape" context-param in web.xml). - - - - errors - org.springframework.validation.Errors - - - - name - true - true - - - - htmlEscape - false - true - - - - - - - - nestedPath - org.springframework.web.servlet.tags.NestedPathTag - JSP - - - Sets a nested path to be used by the bind tag's path. - - - - nestedPath - java.lang.String - - - - path - true - true - - - - - - - - bind - org.springframework.web.servlet.tags.BindTag - JSP - - - Provides BindStatus object for the given bind path. - The HTML escaping flag participates in a page-wide or application-wide setting - (i.e. by HtmlEscapeTag or a "defaultHtmlEscape" context-param in web.xml). - - - - status - org.springframework.web.servlet.support.BindStatus - - - - path - true - true - - - - ignoreNestedPath - false - true - - - - htmlEscape - false - true - - - - - - - - transform - org.springframework.web.servlet.tags.TransformTag - JSP - - - Provides transformation of variables to Strings, using an appropriate - custom PropertyEditor from BindTag (can only be used inside BindTag). - The HTML escaping flag participates in a page-wide or application-wide setting - (i.e. by HtmlEscapeTag or a "defaultHtmlEscape" context-param in web.xml). - - - - value - true - true - - - - var - false - true - - - - scope - false - true - - - - htmlEscape - false - true - - - - - diff --git a/samples/contacts-tiger/src/main/webapp/common/index.jsp b/samples/contacts-tiger/src/main/webapp/common/index.jsp deleted file mode 100644 index 4c86e33093..0000000000 --- a/samples/contacts-tiger/src/main/webapp/common/index.jsp +++ /dev/null @@ -1,4 +0,0 @@ -<%@ include file="/WEB-INF/jsp/include.jsp" %> - -<%-- Redirected because we can't set the welcome page to a virtual URL. --%> - diff --git a/samples/contacts-tiger/src/main/webapp/common/logoff.jsp b/samples/contacts-tiger/src/main/webapp/common/logoff.jsp deleted file mode 100644 index 1b291a5bab..0000000000 --- a/samples/contacts-tiger/src/main/webapp/common/logoff.jsp +++ /dev/null @@ -1,9 +0,0 @@ -<%@ page import="javax.servlet.http.Cookie" %> -<%@ page import="net.sf.acegisecurity.ui.rememberme.TokenBasedRememberMeServices" %> -<% -session.invalidate(); -Cookie terminate = new Cookie(TokenBasedRememberMeServices.ACEGI_SECURITY_HASHED_REMEMBER_ME_COOKIE_KEY, null); -terminate.setMaxAge(0); -response.addCookie(terminate); -response.sendRedirect("index.jsp"); -%> \ No newline at end of file diff --git a/samples/contacts-tiger/src/main/webapp/common/secure/debug.jsp b/samples/contacts-tiger/src/main/webapp/common/secure/debug.jsp deleted file mode 100644 index 50433fab66..0000000000 --- a/samples/contacts-tiger/src/main/webapp/common/secure/debug.jsp +++ /dev/null @@ -1,28 +0,0 @@ -<%@ page import="net.sf.acegisecurity.context.SecurityContextHolder" %> -<%@ page import="net.sf.acegisecurity.Authentication" %> -<%@ page import="net.sf.acegisecurity.GrantedAuthority" %> -<%@ page import="net.sf.acegisecurity.adapters.AuthByAdapter" %> - -<% - Authentication auth = SecurityContextHolder.getContext().getAuthentication(); - if (auth != null) { %> - Authentication object is of type: <%= auth.getClass().getName() %>

- Authentication object as a String: <%= auth.toString() %>

- - Authentication object holds the following granted authorities:

-<% GrantedAuthority[] granted = auth.getAuthorities(); - for (int i = 0; i < granted.length; i++) { %> - <%= granted[i].toString() %> (getAuthority(): <%= granted[i].getAuthority() %>)
-<% } - - if (auth instanceof AuthByAdapter) { %> -
SUCCESS! Your container adapter appears to be properly configured!

-<% } else { %> -
SUCCESS! Your web filters appear to be properly configured!
-<% } - - } else { %> - Authentication object is null.
- This is an error and your Acegi Security application will not operate properly until corrected.

-<% } -%> diff --git a/samples/contacts-tiger/src/main/webapp/filter/WEB-INF/applicationContext-acegi-security.xml b/samples/contacts-tiger/src/main/webapp/filter/WEB-INF/applicationContext-acegi-security.xml deleted file mode 100644 index d185b84fef..0000000000 --- a/samples/contacts-tiger/src/main/webapp/filter/WEB-INF/applicationContext-acegi-security.xml +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - - - - - - - - CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON - PATTERN_TYPE_APACHE_ANT - /**=httpSessionContextIntegrationFilter,logoutFilter,authenticationProcessingFilter,basicProcessingFilter,securityContextHolderAwareRequestFilter,rememberMeProcessingFilter,anonymousProcessingFilter,switchUserProcessingFilter,exceptionTranslationFilter,filterInvocationInterceptor - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - userCache - - - - - - - - - - - - - - - - - Contacts Realm - - - - foobar - anonymousUser,ROLE_ANONYMOUS - - - - foobar - - - - - - - - - - - - - springRocks - - - - springRocks - - - - - - - - - - - - - - - - - - - - - - - CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON - \A/secure/.*\Z=REQUIRES_SECURE_CHANNEL - \A/acegilogin.jsp.*\Z=REQUIRES_SECURE_CHANNEL - \A/j_acegi_security_check.*\Z=REQUIRES_SECURE_CHANNEL - \A.*\Z=REQUIRES_INSECURE_CHANNEL - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /acegilogin.jsp?login_error=1 - / - /j_acegi_security_check - - - - - /acegilogin.jsp - false - - - - false - - - - - - - - - - - - - - CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON - PATTERN_TYPE_APACHE_ANT - /index.jsp=ROLE_ANONYMOUS,ROLE_USER - /hello.htm=ROLE_ANONYMOUS,ROLE_USER - /logoff.jsp=ROLE_ANONYMOUS,ROLE_USER - /switchuser.jsp=ROLE_SUPERVISOR - /j_acegi_switch_user=ROLE_SUPERVISOR - /acegilogin.jsp*=ROLE_ANONYMOUS,ROLE_USER - /**=ROLE_USER - - - - - - - - - /j_acegi_switch_user - /j_acegi_exit_user - /acegi-security-sample-contacts-filter/secure/index.htm - - - diff --git a/samples/contacts-tiger/src/main/webapp/filter/WEB-INF/applicationContext-annotations.xml b/samples/contacts-tiger/src/main/webapp/filter/WEB-INF/applicationContext-annotations.xml deleted file mode 100644 index db2ccac1b8..0000000000 --- a/samples/contacts-tiger/src/main/webapp/filter/WEB-INF/applicationContext-annotations.xml +++ /dev/null @@ -1,227 +0,0 @@ - - - - - - - - - - - - org.acegisecurity.acls.domain.BasePermission.ADMINISTRATION - - - org.acegisecurity.acls.domain.BasePermission.READ - - - org.acegisecurity.acls.domain.BasePermission.DELETE - - - - - - - - - - - - - ACL_CONTACT_READ - - - - - - - - sample.contact.Contact - - - - - - - - - ACL_CONTACT_DELETE - - - - - - - - sample.contact.Contact - - - - - - - - - ACL_CONTACT_ADMIN - - - - - - - sample.contact.Contact - - - - - false - - - - - - - - - - - - - - - - - - - - aclCache - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/contacts-tiger/src/main/webapp/filter/WEB-INF/applicationContext-business.xml b/samples/contacts-tiger/src/main/webapp/filter/WEB-INF/applicationContext-business.xml deleted file mode 100644 index 539fa69fde..0000000000 --- a/samples/contacts-tiger/src/main/webapp/filter/WEB-INF/applicationContext-business.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - org.hsqldb.jdbcDriver - - - jdbc:hsqldb:mem:contacts - - - sa - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/contacts-tiger/src/main/webapp/filter/WEB-INF/web.xml b/samples/contacts-tiger/src/main/webapp/filter/WEB-INF/web.xml deleted file mode 100644 index f4ab0cf7bf..0000000000 --- a/samples/contacts-tiger/src/main/webapp/filter/WEB-INF/web.xml +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - - Contacts Sample Application - - - - contextConfigLocation - - /WEB-INF/applicationContext-acegi-security.xml - /WEB-INF/applicationContext-business.xml - /WEB-INF/applicationContext-annotations.xml - - - - - log4jConfigLocation - /WEB-INF/classes/log4j.properties - - - - Acegi Filter Chain Proxy - org.acegisecurity.util.FilterToBeanProxy - - targetClass - org.acegisecurity.util.FilterChainProxy - - - - - Acegi Filter Chain Proxy - /* - - - - - org.springframework.web.context.ContextLoaderListener - - - - org.springframework.web.util.Log4jConfigListener - - - - - org.acegisecurity.ui.session.HttpSessionEventPublisher - - - - - contacts - org.springframework.web.servlet.DispatcherServlet - 1 - - - - - remoting - org.springframework.web.servlet.DispatcherServlet - 2 - - - - contacts - *.htm - - - - remoting - /remoting/* - - - - index.jsp - - - - /spring - /WEB-INF/spring.tld - - - diff --git a/samples/contacts-tiger/src/main/webapp/filter/accessDenied.jsp b/samples/contacts-tiger/src/main/webapp/filter/accessDenied.jsp deleted file mode 100644 index c35b77d8ce..0000000000 --- a/samples/contacts-tiger/src/main/webapp/filter/accessDenied.jsp +++ /dev/null @@ -1,16 +0,0 @@ -<%@ page import="org.acegisecurity.context.SecurityContextHolder" %> -<%@ page import="org.acegisecurity.Authentication" %> -<%@ page import="org.acegisecurity.ui.AccessDeniedHandlerImpl" %> - -

Sorry, access is denied

- - -

-<%= request.getAttribute(AccessDeniedHandlerImpl.ACEGI_SECURITY_ACCESS_DENIED_EXCEPTION_KEY)%> - -

- -<% Authentication auth = SecurityContextHolder.getContext().getAuthentication(); - if (auth != null) { %> - Authentication object as a String: <%= auth.toString() %>

-<% } %> diff --git a/samples/contacts-tiger/src/main/webapp/filter/acegilogin.jsp b/samples/contacts-tiger/src/main/webapp/filter/acegilogin.jsp deleted file mode 100644 index 6930e472a6..0000000000 --- a/samples/contacts-tiger/src/main/webapp/filter/acegilogin.jsp +++ /dev/null @@ -1,48 +0,0 @@ -<%@ taglib prefix='c' uri='http://java.sun.com/jstl/core' %> -<%@ page import="org.acegisecurity.ui.AbstractProcessingFilter" %> -<%@ page import="org.acegisecurity.ui.webapp.AuthenticationProcessingFilter" %> -<%@ page import="org.acegisecurity.AuthenticationException" %> - - - - Login - - - -

Login

- -

Valid users: -

-

username marissa, password koala -

username dianne, password emu -

username scott, password wombat -

username peter, password opal (user disabled) -

username bill, password wombat -

username bob, password wombat -

username jane, password wombat -

- - <%-- this form-login-page form is also used as the - form-error-page to ask for a login again. - --%> - - - Your login attempt was not successful, try again.

- Reason: <%= ((AuthenticationException) session.getAttribute(AbstractProcessingFilter.ACEGI_SECURITY_LAST_EXCEPTION_KEY)).getMessage() %> -
-
- -

- - - - - - - -
User:value='<%= session.getAttribute(AuthenticationProcessingFilter.ACEGI_SECURITY_LAST_USERNAME_KEY) %>'>
Password:
Don't ask for my password for two weeks
- -
- - - diff --git a/samples/contacts-tiger/src/main/webapp/filter/exitUser.jsp b/samples/contacts-tiger/src/main/webapp/filter/exitUser.jsp deleted file mode 100644 index baae57491c..0000000000 --- a/samples/contacts-tiger/src/main/webapp/filter/exitUser.jsp +++ /dev/null @@ -1,45 +0,0 @@ -<%@ taglib prefix='c' uri='http://java.sun.com/jstl/core' %> - -<%@ page import="org.acegisecurity.context.SecurityContextHolder" %> -<%@ page import="org.acegisecurity.Authentication" %> -<%@ page import="org.acegisecurity.ui.AbstractProcessingFilter" %> -<%@ page import="org.acegisecurity.ui.webapp.AuthenticationProcessingFilter" %> -<%@ page import="org.acegisecurity.AuthenticationException" %> - - - - Exit User - - - -

Exit User

- - - - Your 'Exit User' attempt was not successful, try again.

- Reason: <%= ((AuthenticationException) session.getAttribute(AbstractProcessingFilter.ACEGI_SECURITY_LAST_EXCEPTION_KEY)).getMessage() %> -
-
- -
- - - -
Current User: - - <% - Authentication auth = SecurityContextHolder.getContext().getAuthentication(); - if (auth != null) { %> - - <%= auth.getPrincipal().toString() %> - - <% } %> - - - -
- -
- - - diff --git a/samples/contacts-tiger/src/main/webapp/filter/switchUser.jsp b/samples/contacts-tiger/src/main/webapp/filter/switchUser.jsp deleted file mode 100644 index caa7f1292c..0000000000 --- a/samples/contacts-tiger/src/main/webapp/filter/switchUser.jsp +++ /dev/null @@ -1,43 +0,0 @@ -<%@ taglib prefix='c' uri='http://java.sun.com/jstl/core' %> -<%@ page import="org.acegisecurity.ui.AbstractProcessingFilter" %> -<%@ page import="org.acegisecurity.ui.webapp.AuthenticationProcessingFilter" %> -<%@ page import="org.acegisecurity.AuthenticationException" %> - - - - Switch User - - - -

Switch to User

- -

Valid users: -

-

username marissa, password koala -

username dianne, password emu -

username scott, password wombat -

username bill, password wombat -

username bob, password wombat -

username jane, password wombat -

- - <%-- this form-login-page form is also used as the - form-error-page to ask for a login again. - --%> - - - Your 'su' attempt was not successful, try again.

- Reason: <%= ((AuthenticationException) session.getAttribute(AbstractProcessingFilter.ACEGI_SECURITY_LAST_EXCEPTION_KEY)).getMessage() %> -
-
- -

- - - -
User:
- -
- - -