Contacts demonstrates the following central Acegi Security capabilities:
-
-
Role-based security. Each principal is a member of certain roles,
- which are used to restrict access to certain secure objects.
-
Domain object instance security. The Contact, the
- main domain object in the application, has an access control list (ACL)
- that indicates who is allowed read, administer and delete the object.
-
Method invocation security. The ContactManager service
- layer bean has a number of secured (protected) and public (unprotected)
- methods.
-
Web request security. The /secure URI path is protected
- by Acegi Security from principals not holding the
- ROLE_USER granted authority.
-
Security unaware application objects. None of the objects
- are aware of the security being implemented by Acegi Security. *
-
Security taglib usage. All of the JSPs use Acegi Security's
- taglib to evaluate security information. *
-
Fully declarative security. Every capability is configured in
- the application context using standard Acegi Security classes. *
-
Database-sourced security data. All of the user, role and ACL
- information is obtained from an in-memory JDBC-compliant database.
-
Integrated form-based and BASIC authentication. Any BASIC
- authentication header is detected and used for authentication. Normal
- interactive form-based authentication is used by default.
-
Remember-me services. Acegi Security's pluggable remember-me
- strategy is demonstrated, with a corresponding checkbox on the login form.
-
-
-* 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:
-
">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.
-
- <%-- 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.
-
- <%-- 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.