5 changed files with 0 additions and 207 deletions
@ -1,46 +0,0 @@
@@ -1,46 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> |
||||
<!-- |
||||
* The Acegi Security System for Spring is published under the terms |
||||
* of the Apache Software License. |
||||
* |
||||
* This springsecurity.xml file will only be used by Resin. Normally the |
||||
* springsecurity.xml is container-wide, but in the case of Resin it is |
||||
* web application specific. |
||||
* |
||||
* $Id$ |
||||
--> |
||||
|
||||
<beans> |
||||
|
||||
<!-- ================= CONTAINER ADAPTER CONFIGURATION ================ --> |
||||
|
||||
<!-- Data access object which stores authentication information --> |
||||
<bean id="inMemoryDaoImpl" class="net.sf.acegisecurity.providers.dao.memory.InMemoryDaoImpl"> |
||||
<property name="userMap"> |
||||
<value> |
||||
marissa=koala,ROLE_TELLER,ROLE_SUPERVISOR |
||||
dianne=emu,ROLE_TELLER |
||||
scott=wombat,ROLE_TELLER |
||||
peter=opal,disabled,ROLE_TELLER |
||||
</value> |
||||
</property> |
||||
</bean> |
||||
|
||||
<!-- Authentication provider that queries our data access object --> |
||||
<bean id="daoAuthenticationProvider" class="net.sf.acegisecurity.providers.dao.DaoAuthenticationProvider"> |
||||
<property name="authenticationDao"><ref bean="inMemoryDaoImpl"/></property> |
||||
<property name="ignorePasswordCase"><value>false</value></property> |
||||
<property name="ignoreUsernameCase"><value>true</value></property> |
||||
</bean> |
||||
|
||||
<!-- The authentication manager that iterates through our only authentication provider --> |
||||
<bean id="authenticationManager" class="net.sf.acegisecurity.providers.ProviderManager"> |
||||
<property name="providers"> |
||||
<list> |
||||
<ref bean="daoAuthenticationProvider"/> |
||||
</list> |
||||
</property> |
||||
</bean> |
||||
|
||||
</beans> |
||||
@ -1,6 +0,0 @@
@@ -1,6 +0,0 @@
|
||||
<!-- |
||||
- $Id$ |
||||
--> |
||||
<jboss-web> |
||||
<security-domain>java:/jaas/SpringPoweredRealm</security-domain> |
||||
</jboss-web> |
||||
@ -1,12 +0,0 @@
@@ -1,12 +0,0 @@
|
||||
<!-- |
||||
- $Id$ |
||||
--> |
||||
<web-app> |
||||
<authenticator> |
||||
<type>net.sf.acegisecurity.adapters.resin.ResinAcegiAuthenticator</type> |
||||
<init> |
||||
<app-context-location>resin-acegisecurity.xml</app-context-location> |
||||
<key>my_password</key> |
||||
</init> |
||||
</authenticator> |
||||
</web-app> |
||||
@ -1,100 +0,0 @@
@@ -1,100 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN' 'http://java.sun.com/dtd/web-app_2_3.dtd'> |
||||
|
||||
<!-- |
||||
- Contacts web application |
||||
- $Id$ |
||||
--> |
||||
|
||||
<web-app> |
||||
|
||||
<display-name>Contacts Sample Application</display-name> |
||||
|
||||
<description> |
||||
Example of an application secured using Acegi Security System for Spring. |
||||
</description> |
||||
|
||||
<filter> |
||||
<filter-name>Acegi Security System for Spring</filter-name> |
||||
<filter-class>net.sf.acegisecurity.adapters.AutoIntegrationFilter</filter-class> |
||||
</filter> |
||||
|
||||
<filter-mapping> |
||||
<filter-name>Acegi Security System for Spring</filter-name> |
||||
<url-pattern>/*</url-pattern> |
||||
</filter-mapping> |
||||
|
||||
<!-- |
||||
- Servlet that dispatches request to registered handlers (Controller implementations). |
||||
- Has its own application context, by default defined in "{servlet-name}-servlet.xml", |
||||
- i.e. "contacts-servlet.xml". |
||||
- |
||||
- A web app can contain any number of such servlets. |
||||
- Note that this web app does not have a shared root application context, |
||||
- therefore the DispatcherServlet contexts do not have a common parent. |
||||
--> |
||||
<servlet> |
||||
<servlet-name>contacts</servlet-name> |
||||
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> |
||||
<load-on-startup>1</load-on-startup> |
||||
</servlet> |
||||
|
||||
<!-- |
||||
- Maps the contacts dispatcher to /*. |
||||
- |
||||
--> |
||||
<servlet-mapping> |
||||
<servlet-name>contacts</servlet-name> |
||||
<url-pattern>*.htm</url-pattern> |
||||
</servlet-mapping> |
||||
|
||||
<welcome-file-list> |
||||
<welcome-file>index.jsp</welcome-file> |
||||
</welcome-file-list> |
||||
|
||||
<taglib> |
||||
<taglib-uri>/spring</taglib-uri> |
||||
<taglib-location>/WEB-INF/spring.tld</taglib-location> |
||||
</taglib> |
||||
|
||||
<security-constraint> |
||||
<display-name>Secured Area Security Constraint</display-name> |
||||
<web-resource-collection> |
||||
<web-resource-name>Secured Area</web-resource-name> |
||||
<!-- Define the context-relative URL(s) to be protected --> |
||||
<url-pattern>/secure/*</url-pattern> |
||||
</web-resource-collection> |
||||
<auth-constraint> |
||||
<!-- Anyone with one of the listed roles may access this area --> |
||||
<role-name>ROLE_TELLER</role-name> |
||||
<role-name>ROLE_SUPERVISOR</role-name> |
||||
</auth-constraint> |
||||
</security-constraint> |
||||
|
||||
<!-- Default login configuration using BASIC authentication --> |
||||
<!-- |
||||
<login-config> |
||||
<auth-method>BASIC</auth-method> |
||||
<realm-name>Spring Powered Realm</realm-name> |
||||
</login-config> |
||||
--> |
||||
|
||||
<!-- Default login configuration using form-based authentication --> |
||||
<login-config> |
||||
<auth-method>FORM</auth-method> |
||||
<realm-name>Spring Powered Realm</realm-name> |
||||
<form-login-config> |
||||
<form-login-page>/login.jsp</form-login-page> |
||||
<form-error-page>/login.jsp?login_error=1</form-error-page> |
||||
</form-login-config> |
||||
</login-config> |
||||
|
||||
<!-- Security roles referenced by this web application --> |
||||
<security-role> |
||||
<role-name>ROLE_SUPERVISOR</role-name> |
||||
</security-role> |
||||
<security-role> |
||||
<role-name>ROLE_TELLER</role-name> |
||||
</security-role> |
||||
|
||||
</web-app> |
||||
@ -1,43 +0,0 @@
@@ -1,43 +0,0 @@
|
||||
<%@ taglib prefix='c' uri='http://java.sun.com/jstl/core' %> |
||||
|
||||
<html> |
||||
<head> |
||||
<title>Login</title> |
||||
</head> |
||||
|
||||
<body> |
||||
<h1>Login</h1> |
||||
|
||||
<P>If you've used the standard springsecurity.xml, try these users: |
||||
<P> |
||||
<P>username <b>marissa</b>, password <b>koala</b> (granted ROLE_SUPERVISOR) |
||||
<P>username <b>dianne</b>, password <b>emu</b> (not a supervisor) |
||||
<p>username <b>scott</b>, password <b>wombat</b> (not a supervisor) |
||||
<p> |
||||
|
||||
<%-- this form-login-page form is also used as the |
||||
form-error-page to ask for a login again. |
||||
--%> |
||||
<c:if test="${not empty param.login_error}"> |
||||
<font color="red"> |
||||
Your login attempt was not successful, try again. |
||||
</font> |
||||
</c:if> |
||||
|
||||
<form action="<c:url value='j_security_check'/>" method="POST"> |
||||
<table> |
||||
<tr><td>User:</td><td><input type='text' name='j_username'></td></tr> |
||||
<tr><td>Password:</td><td><input type='password' name='j_password'></td></tr> |
||||
|
||||
<tr><td colspan='2'><input name="submit" type="submit"></td></tr> |
||||
<tr><td colspan='2'><input name="reset" type="reset"></td></tr> |
||||
</table> |
||||
|
||||
<!-- |
||||
- The j_uri is a Resin requirement (ignored by other containers) |
||||
--> |
||||
<input type='hidden' name='j_uri' value='/secure/index.htm'/> |
||||
</form> |
||||
|
||||
</body> |
||||
</html> |
||||
Loading…
Reference in new issue