mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-07-05 10:12:36 +00:00
Migrated to maven
This commit is contained in:
parent
6b266bc677
commit
518ee40740
@ -1,40 +1,40 @@
|
|||||||
<%@ include file="/WEB-INF/jsp/include.jsp" %>
|
<%@ include file="/WEB-INF/jsp/include.jsp" %>
|
||||||
<html>
|
<html>
|
||||||
<head><title>Add New Contact</title></head>
|
<head><title>Add New Contact</title></head>
|
||||||
<body>
|
<body>
|
||||||
<h1>Add Contact</h1>
|
<h1>Add Contact</h1>
|
||||||
<form method="post">
|
<form method="post">
|
||||||
<table width="95%" bgcolor="f8f8ff" border="0" cellspacing="0" cellpadding="5">
|
<table width="95%" bgcolor="f8f8ff" border="0" cellspacing="0" cellpadding="5">
|
||||||
<tr>
|
<tr>
|
||||||
<td alignment="right" width="20%">Name:</td>
|
<td alignment="right" width="20%">Name:</td>
|
||||||
<spring:bind path="webContact.name">
|
<spring:bind path="webContact.name">
|
||||||
<td width="20%">
|
<td width="20%">
|
||||||
<input type="text" name="name" value="<c:out value="${status.value}"/>">
|
<input type="text" name="name" value="<c:out value="${status.value}"/>">
|
||||||
</td>
|
</td>
|
||||||
<td width="60%">
|
<td width="60%">
|
||||||
<font color="red"><c:out value="${status.errorMessage}"/></font>
|
<font color="red"><c:out value="${status.errorMessage}"/></font>
|
||||||
</td>
|
</td>
|
||||||
</spring:bind>
|
</spring:bind>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td alignment="right" width="20%">Email:</td>
|
<td alignment="right" width="20%">Email:</td>
|
||||||
<spring:bind path="webContact.email">
|
<spring:bind path="webContact.email">
|
||||||
<td width="20%">
|
<td width="20%">
|
||||||
<input type="text" name="email" value="<c:out value="${status.value}"/>">
|
<input type="text" name="email" value="<c:out value="${status.value}"/>">
|
||||||
</td>
|
</td>
|
||||||
<td width="60%">
|
<td width="60%">
|
||||||
<font color="red"><c:out value="${status.errorMessage}"/></font>
|
<font color="red"><c:out value="${status.errorMessage}"/></font>
|
||||||
</td>
|
</td>
|
||||||
</spring:bind>
|
</spring:bind>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<br>
|
<br>
|
||||||
<spring:hasBindErrors name="webContact">
|
<spring:hasBindErrors name="webContact">
|
||||||
<b>Please fix all errors!</b>
|
<b>Please fix all errors!</b>
|
||||||
</spring:hasBindErrors>
|
</spring:hasBindErrors>
|
||||||
<br><br>
|
<br><br>
|
||||||
<input name="execute" type="submit" alignment="center" value="Execute">
|
<input name="execute" type="submit" alignment="center" value="Execute">
|
||||||
</form>
|
</form>
|
||||||
<a href="<c:url value="../hello.htm"/>">Home</a>
|
<a href="<c:url value="../hello.htm"/>">Home</a>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
@ -1,13 +1,13 @@
|
|||||||
<%@ include file="/WEB-INF/jsp/include.jsp" %>
|
<%@ include file="/WEB-INF/jsp/include.jsp" %>
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
<head><title>Deletion completed</title></head>
|
<head><title>Deletion completed</title></head>
|
||||||
<body>
|
<body>
|
||||||
<h1>Deleted</h1>
|
<h1>Deleted</h1>
|
||||||
<P>
|
<P>
|
||||||
<code>
|
<code>
|
||||||
<c:out value="${contact}"/>
|
<c:out value="${contact}"/>
|
||||||
</code>
|
</code>
|
||||||
<p><a href="<c:url value="index.htm"/>">Manage</a>
|
<p><a href="<c:url value="index.htm"/>">Manage</a>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
@ -1,32 +1,32 @@
|
|||||||
<%@ include file="/WEB-INF/jsp/include.jsp" %>
|
<%@ include file="/WEB-INF/jsp/include.jsp" %>
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
<head><title>Contacts Security Demo</title></head>
|
<head><title>Contacts Security Demo</title></head>
|
||||||
<body>
|
<body>
|
||||||
<h1>Contacts Security Demo</h1>
|
<h1>Contacts Security Demo</h1>
|
||||||
<p>This is a very simple application to demonstrate the Acegi Security System for Spring.
|
<p>This is a very simple application to demonstrate the Acegi Security System for Spring.
|
||||||
The application manages contacts, partitioned based on the user that owns them.
|
The application manages contacts, partitioned based on the user that owns them.
|
||||||
Users may only manage their own contacts, and only users with ROLE_SUPERVISOR
|
Users may only manage their own contacts, and only users with ROLE_SUPERVISOR
|
||||||
are allowed to delete their contacts. It also demonstrates how to configure
|
are allowed to delete their contacts. It also demonstrates how to configure
|
||||||
server-side secure objects so they can only be accessed via a public facade.
|
server-side secure objects so they can only be accessed via a public facade.
|
||||||
|
|
||||||
<P>If you deployed the contacts-container-adapter.war file, the application
|
<P>If you deployed the contacts-container-adapter.war file, the application
|
||||||
automatically extracts the principal from the web container (which should be
|
automatically extracts the principal from the web container (which should be
|
||||||
configured with a suitable Acegi Security System for Spring adapter). If
|
configured with a suitable Acegi Security System for Spring adapter). If
|
||||||
you're using the standard contacts.war file, the application is entirely
|
you're using the standard contacts.war file, the application is entirely
|
||||||
self-contained and you don't need to do anything special with your web
|
self-contained and you don't need to do anything special with your web
|
||||||
container. If you're using the contacts-cas.war file, please review the
|
container. If you're using the contacts-cas.war file, please review the
|
||||||
setup in samples/contacts/etc/cas/applicationContext.xml for your CAS server
|
setup in samples/contacts/etc/cas/applicationContext.xml for your CAS server
|
||||||
and if necessary rebuild using the Contacts application's build.xml.
|
and if necessary rebuild using the Contacts application's build.xml.
|
||||||
|
|
||||||
<P>This application also demonstrates a public method, which is used to select
|
<P>This application also demonstrates a public method, which is used to select
|
||||||
the random contact that is shown below:
|
the random contact that is shown below:
|
||||||
<P>
|
<P>
|
||||||
<code>
|
<code>
|
||||||
<c:out value="${contact}"/>
|
<c:out value="${contact}"/>
|
||||||
</code>
|
</code>
|
||||||
<p>
|
<p>
|
||||||
<p><A HREF="<c:url value="secure/index.htm"/>">Manage</a>
|
<p><A HREF="<c:url value="secure/index.htm"/>">Manage</a>
|
||||||
<A HREF="<c:url value="secure/debug.jsp"/>">Debug</a>
|
<A HREF="<c:url value="secure/debug.jsp"/>">Debug</a>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
@ -1,5 +1,5 @@
|
|||||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
|
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
|
||||||
<%@ taglib prefix="authz" uri="http://acegisecurity.sf.net/authz" %>
|
<%@ taglib prefix="authz" uri="http://acegisecurity.sf.net/authz" %>
|
||||||
|
|
||||||
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
|
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
|
||||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>
|
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>
|
@ -1,29 +1,29 @@
|
|||||||
<%@ include file="/WEB-INF/jsp/include.jsp" %>
|
<%@ include file="/WEB-INF/jsp/include.jsp" %>
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
<head><title>Your Contacts</title></head>
|
<head><title>Your Contacts</title></head>
|
||||||
<body>
|
<body>
|
||||||
<h1><c:out value="${model.user}"/>'s Contacts</h1>
|
<h1><c:out value="${model.user}"/>'s Contacts</h1>
|
||||||
<P>
|
<P>
|
||||||
<table cellpadding=3 border=0>
|
<table cellpadding=3 border=0>
|
||||||
<tr><td><b>id</b></td><td><b>Name</b></td><td><b>Email</b></td></tr>
|
<tr><td><b>id</b></td><td><b>Name</b></td><td><b>Email</b></td></tr>
|
||||||
<c:forEach var="contact" items="${model.contacts}">
|
<c:forEach var="contact" items="${model.contacts}">
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<c:out value="${contact.id}"/>
|
<c:out value="${contact.id}"/>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<c:out value="${contact.name}"/>
|
<c:out value="${contact.name}"/>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<c:out value="${contact.email}"/>
|
<c:out value="${contact.email}"/>
|
||||||
</td>
|
</td>
|
||||||
<authz:authorize ifAllGranted="ROLE_SUPERVISOR">
|
<authz:authorize ifAllGranted="ROLE_SUPERVISOR">
|
||||||
<td><A HREF="<c:url value="del.htm"><c:param name="id" value="${contact.id}"/></c:url>">Del</A></td>
|
<td><A HREF="<c:url value="del.htm"><c:param name="id" value="${contact.id}"/></c:url>">Del</A></td>
|
||||||
</authz:authorize>
|
</authz:authorize>
|
||||||
</tr>
|
</tr>
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
</table>
|
</table>
|
||||||
<p><a href="<c:url value="add.htm"/>">Add</a> <p><a href="<c:url value="../logoff.jsp"/>">Logoff</a>
|
<p><a href="<c:url value="add.htm"/>">Add</a> <p><a href="<c:url value="../logoff.jsp"/>">Logoff</a>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
@ -1,193 +1,193 @@
|
|||||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||||
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
|
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
|
||||||
|
|
||||||
<taglib>
|
<taglib>
|
||||||
|
|
||||||
<tlib-version>1.0</tlib-version>
|
<tlib-version>1.0</tlib-version>
|
||||||
|
|
||||||
<jsp-version>1.2</jsp-version>
|
<jsp-version>1.2</jsp-version>
|
||||||
|
|
||||||
<short-name>Spring</short-name>
|
<short-name>Spring</short-name>
|
||||||
|
|
||||||
<uri>http://www.springframework.org/tags</uri>
|
<uri>http://www.springframework.org/tags</uri>
|
||||||
|
|
||||||
<description>Spring Framework JSP Tag Library. Authors: Rod Johnson, Juergen Hoeller</description>
|
<description>Spring Framework JSP Tag Library. Authors: Rod Johnson, Juergen Hoeller</description>
|
||||||
|
|
||||||
<tag>
|
<tag>
|
||||||
|
|
||||||
<name>htmlEscape</name>
|
<name>htmlEscape</name>
|
||||||
<tag-class>org.springframework.web.servlet.tags.HtmlEscapeTag</tag-class>
|
<tag-class>org.springframework.web.servlet.tags.HtmlEscapeTag</tag-class>
|
||||||
<body-content>JSP</body-content>
|
<body-content>JSP</body-content>
|
||||||
|
|
||||||
<description>
|
<description>
|
||||||
Sets default HTML escape value for the current page.
|
Sets default HTML escape value for the current page.
|
||||||
</description>
|
</description>
|
||||||
|
|
||||||
<attribute>
|
<attribute>
|
||||||
<name>defaultHtmlEscape</name>
|
<name>defaultHtmlEscape</name>
|
||||||
<required>true</required>
|
<required>true</required>
|
||||||
<rtexprvalue>true</rtexprvalue>
|
<rtexprvalue>true</rtexprvalue>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
|
||||||
</tag>
|
</tag>
|
||||||
|
|
||||||
<tag>
|
<tag>
|
||||||
|
|
||||||
<name>message</name>
|
<name>message</name>
|
||||||
<tag-class>org.springframework.web.servlet.tags.MessageTag</tag-class>
|
<tag-class>org.springframework.web.servlet.tags.MessageTag</tag-class>
|
||||||
<body-content>JSP</body-content>
|
<body-content>JSP</body-content>
|
||||||
|
|
||||||
<description>
|
<description>
|
||||||
Retrieves the message with the given code, or text if code isn't resolvable.
|
Retrieves the message with the given code, or text if code isn't resolvable.
|
||||||
</description>
|
</description>
|
||||||
|
|
||||||
<attribute>
|
<attribute>
|
||||||
<name>code</name>
|
<name>code</name>
|
||||||
<required>false</required>
|
<required>false</required>
|
||||||
<rtexprvalue>true</rtexprvalue>
|
<rtexprvalue>true</rtexprvalue>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
|
||||||
<attribute>
|
<attribute>
|
||||||
<name>text</name>
|
<name>text</name>
|
||||||
<required>false</required>
|
<required>false</required>
|
||||||
<rtexprvalue>true</rtexprvalue>
|
<rtexprvalue>true</rtexprvalue>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
|
||||||
<attribute>
|
<attribute>
|
||||||
<name>htmlEscape</name>
|
<name>htmlEscape</name>
|
||||||
<required>false</required>
|
<required>false</required>
|
||||||
<rtexprvalue>true</rtexprvalue>
|
<rtexprvalue>true</rtexprvalue>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
|
||||||
</tag>
|
</tag>
|
||||||
|
|
||||||
<tag>
|
<tag>
|
||||||
|
|
||||||
<name>theme</name>
|
<name>theme</name>
|
||||||
<tag-class>org.springframework.web.servlet.tags.ThemeTag</tag-class>
|
<tag-class>org.springframework.web.servlet.tags.ThemeTag</tag-class>
|
||||||
<body-content>JSP</body-content>
|
<body-content>JSP</body-content>
|
||||||
|
|
||||||
<description>
|
<description>
|
||||||
Retrieves the theme message with the given code, or text if code isn't resolvable.
|
Retrieves the theme message with the given code, or text if code isn't resolvable.
|
||||||
</description>
|
</description>
|
||||||
|
|
||||||
<attribute>
|
<attribute>
|
||||||
<name>code</name>
|
<name>code</name>
|
||||||
<required>false</required>
|
<required>false</required>
|
||||||
<rtexprvalue>true</rtexprvalue>
|
<rtexprvalue>true</rtexprvalue>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
|
||||||
<attribute>
|
<attribute>
|
||||||
<name>text</name>
|
<name>text</name>
|
||||||
<required>false</required>
|
<required>false</required>
|
||||||
<rtexprvalue>true</rtexprvalue>
|
<rtexprvalue>true</rtexprvalue>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
|
||||||
<attribute>
|
<attribute>
|
||||||
<name>htmlEscape</name>
|
<name>htmlEscape</name>
|
||||||
<required>false</required>
|
<required>false</required>
|
||||||
<rtexprvalue>true</rtexprvalue>
|
<rtexprvalue>true</rtexprvalue>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
|
||||||
</tag>
|
</tag>
|
||||||
|
|
||||||
<tag>
|
<tag>
|
||||||
|
|
||||||
<name>hasBindErrors</name>
|
<name>hasBindErrors</name>
|
||||||
<tag-class>org.springframework.web.servlet.tags.BindErrorsTag</tag-class>
|
<tag-class>org.springframework.web.servlet.tags.BindErrorsTag</tag-class>
|
||||||
<body-content>JSP</body-content>
|
<body-content>JSP</body-content>
|
||||||
|
|
||||||
<description>
|
<description>
|
||||||
Provides Errors instance in case of bind errors.
|
Provides Errors instance in case of bind errors.
|
||||||
</description>
|
</description>
|
||||||
|
|
||||||
<!-- Note: Was "Integer count" in earlier version -->
|
<!-- Note: Was "Integer count" in earlier version -->
|
||||||
<variable>
|
<variable>
|
||||||
<name-given>errors</name-given>
|
<name-given>errors</name-given>
|
||||||
<variable-class>org.springframework.validation.Errors</variable-class>
|
<variable-class>org.springframework.validation.Errors</variable-class>
|
||||||
</variable>
|
</variable>
|
||||||
|
|
||||||
<!-- Note: Now one Errors instance per bind object -> name of object needed -->
|
<!-- Note: Now one Errors instance per bind object -> name of object needed -->
|
||||||
<attribute>
|
<attribute>
|
||||||
<name>name</name>
|
<name>name</name>
|
||||||
<required>true</required>
|
<required>true</required>
|
||||||
<rtexprvalue>true</rtexprvalue>
|
<rtexprvalue>true</rtexprvalue>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
|
||||||
<attribute>
|
<attribute>
|
||||||
<name>htmlEscape</name>
|
<name>htmlEscape</name>
|
||||||
<required>false</required>
|
<required>false</required>
|
||||||
<rtexprvalue>true</rtexprvalue>
|
<rtexprvalue>true</rtexprvalue>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
|
||||||
</tag>
|
</tag>
|
||||||
|
|
||||||
<tag>
|
<tag>
|
||||||
|
|
||||||
<name>bind</name>
|
<name>bind</name>
|
||||||
<tag-class>org.springframework.web.servlet.tags.BindTag</tag-class>
|
<tag-class>org.springframework.web.servlet.tags.BindTag</tag-class>
|
||||||
<body-content>JSP</body-content>
|
<body-content>JSP</body-content>
|
||||||
|
|
||||||
<description>
|
<description>
|
||||||
Provides BindStatus instance for certain bind path.
|
Provides BindStatus instance for certain bind path.
|
||||||
</description>
|
</description>
|
||||||
|
|
||||||
<!-- Note: Was "bind" in earlier version -->
|
<!-- Note: Was "bind" in earlier version -->
|
||||||
<variable>
|
<variable>
|
||||||
<name-given>status</name-given>
|
<name-given>status</name-given>
|
||||||
<variable-class>org.springframework.web.servlet.tags.BindStatus</variable-class>
|
<variable-class>org.springframework.web.servlet.tags.BindStatus</variable-class>
|
||||||
</variable>
|
</variable>
|
||||||
|
|
||||||
<!-- Note: Was "value" in earlier version -->
|
<!-- Note: Was "value" in earlier version -->
|
||||||
<attribute>
|
<attribute>
|
||||||
<name>path</name>
|
<name>path</name>
|
||||||
<required>true</required>
|
<required>true</required>
|
||||||
<rtexprvalue>true</rtexprvalue>
|
<rtexprvalue>true</rtexprvalue>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
|
||||||
<attribute>
|
<attribute>
|
||||||
<name>htmlEscape</name>
|
<name>htmlEscape</name>
|
||||||
<required>false</required>
|
<required>false</required>
|
||||||
<rtexprvalue>true</rtexprvalue>
|
<rtexprvalue>true</rtexprvalue>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
|
||||||
</tag>
|
</tag>
|
||||||
|
|
||||||
<tag>
|
<tag>
|
||||||
|
|
||||||
<name>transform</name>
|
<name>transform</name>
|
||||||
<tag-class>org.springframework.web.servlet.tags.TransformTag</tag-class>
|
<tag-class>org.springframework.web.servlet.tags.TransformTag</tag-class>
|
||||||
<body-content>JSP</body-content>
|
<body-content>JSP</body-content>
|
||||||
|
|
||||||
<description>
|
<description>
|
||||||
Provides transformation of variables to Strings using appropriate
|
Provides transformation of variables to Strings using appropriate
|
||||||
Custom Editor from BindTag (can only be used inside BindTag)
|
Custom Editor from BindTag (can only be used inside BindTag)
|
||||||
</description>
|
</description>
|
||||||
|
|
||||||
<attribute>
|
<attribute>
|
||||||
<name>value</name>
|
<name>value</name>
|
||||||
<required>true</required>
|
<required>true</required>
|
||||||
<rtexprvalue>true</rtexprvalue>
|
<rtexprvalue>true</rtexprvalue>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
|
||||||
<attribute>
|
<attribute>
|
||||||
<name>var</name>
|
<name>var</name>
|
||||||
<required>false</required>
|
<required>false</required>
|
||||||
<rtexprvalue>true</rtexprvalue>
|
<rtexprvalue>true</rtexprvalue>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
|
||||||
<attribute>
|
<attribute>
|
||||||
<name>scope</name>
|
<name>scope</name>
|
||||||
<required>false</required>
|
<required>false</required>
|
||||||
<rtexprvalue>true</rtexprvalue>
|
<rtexprvalue>true</rtexprvalue>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
|
||||||
<attribute>
|
<attribute>
|
||||||
<name>htmlEscape</name>
|
<name>htmlEscape</name>
|
||||||
<required>false</required>
|
<required>false</required>
|
||||||
<rtexprvalue>true</rtexprvalue>
|
<rtexprvalue>true</rtexprvalue>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
|
||||||
</tag>
|
</tag>
|
||||||
|
|
||||||
</taglib>
|
</taglib>
|
@ -1,4 +1,4 @@
|
|||||||
<%@ include file="/WEB-INF/jsp/include.jsp" %>
|
<%@ include file="/WEB-INF/jsp/include.jsp" %>
|
||||||
|
|
||||||
<%-- Redirected because we can't set the welcome page to a virtual URL. --%>
|
<%-- Redirected because we can't set the welcome page to a virtual URL. --%>
|
||||||
<c:redirect url="/hello.htm"/>
|
<c:redirect url="/hello.htm"/>
|
@ -1,3 +1,3 @@
|
|||||||
<%session.invalidate();
|
<%session.invalidate();
|
||||||
response.sendRedirect("index.jsp");
|
response.sendRedirect("index.jsp");
|
||||||
%>
|
%>
|
@ -1,47 +1,47 @@
|
|||||||
<%@ page import="net.sf.acegisecurity.context.Context" %>
|
<%@ page import="net.sf.acegisecurity.context.Context" %>
|
||||||
<%@ page import="net.sf.acegisecurity.context.ContextHolder" %>
|
<%@ page import="net.sf.acegisecurity.context.ContextHolder" %>
|
||||||
<%@ page import="net.sf.acegisecurity.context.SecureContext" %>
|
<%@ page import="net.sf.acegisecurity.context.SecureContext" %>
|
||||||
<%@ page import="net.sf.acegisecurity.Authentication" %>
|
<%@ page import="net.sf.acegisecurity.Authentication" %>
|
||||||
<%@ page import="net.sf.acegisecurity.GrantedAuthority" %>
|
<%@ page import="net.sf.acegisecurity.GrantedAuthority" %>
|
||||||
<%@ page import="net.sf.acegisecurity.adapters.AuthByAdapter" %>
|
<%@ page import="net.sf.acegisecurity.adapters.AuthByAdapter" %>
|
||||||
|
|
||||||
<% Context context = ContextHolder.getContext();
|
<% Context context = ContextHolder.getContext();
|
||||||
if (context != null) { %>
|
if (context != null) { %>
|
||||||
Context on ContextHolder is of type: <%= context.getClass().getName() %><BR><BR>
|
Context on ContextHolder is of type: <%= context.getClass().getName() %><BR><BR>
|
||||||
|
|
||||||
<% if (context instanceof SecureContext) { %>
|
<% if (context instanceof SecureContext) { %>
|
||||||
The Context implements SecureContext.<BR><BR>
|
The Context implements SecureContext.<BR><BR>
|
||||||
<% SecureContext sc = (SecureContext) context;
|
<% SecureContext sc = (SecureContext) context;
|
||||||
|
|
||||||
Authentication auth = sc.getAuthentication();
|
Authentication auth = sc.getAuthentication();
|
||||||
if (auth != null) { %>
|
if (auth != null) { %>
|
||||||
Authentication object is of type: <%= auth.getClass().getName() %><BR><BR>
|
Authentication object is of type: <%= auth.getClass().getName() %><BR><BR>
|
||||||
Authentication object as a String: <%= auth.toString() %><BR><BR>
|
Authentication object as a String: <%= auth.toString() %><BR><BR>
|
||||||
|
|
||||||
Authentication object holds the following granted authorities:<BR><BR>
|
Authentication object holds the following granted authorities:<BR><BR>
|
||||||
<% GrantedAuthority[] granted = auth.getAuthorities();
|
<% GrantedAuthority[] granted = auth.getAuthorities();
|
||||||
for (int i = 0; i < granted.length; i++) { %>
|
for (int i = 0; i < granted.length; i++) { %>
|
||||||
<%= granted[i].toString() %> (getAuthority(): <%= granted[i].getAuthority() %>)<BR>
|
<%= granted[i].toString() %> (getAuthority(): <%= granted[i].getAuthority() %>)<BR>
|
||||||
<% }
|
<% }
|
||||||
|
|
||||||
if (auth instanceof AuthByAdapter) { %>
|
if (auth instanceof AuthByAdapter) { %>
|
||||||
<BR><B>SUCCESS! Your container adapter appears to be properly configured!</B><BR><BR>
|
<BR><B>SUCCESS! Your container adapter appears to be properly configured!</B><BR><BR>
|
||||||
<% } else { %>
|
<% } else { %>
|
||||||
<BR><B>SUCCESS! Your web filter appears to be properly configured!</B><BR>
|
<BR><B>SUCCESS! Your web filter appears to be properly configured!</B><BR>
|
||||||
<% }
|
<% }
|
||||||
|
|
||||||
} else { %>
|
} else { %>
|
||||||
Authentication object is null.<BR>
|
Authentication object is null.<BR>
|
||||||
This is an error and your container adapter will not operate properly until corrected.<BR><BR>
|
This is an error and your container adapter will not operate properly until corrected.<BR><BR>
|
||||||
<% }
|
<% }
|
||||||
} else { %>
|
} else { %>
|
||||||
<B>ContextHolder does not contain a SecureContext.</B><BR>
|
<B>ContextHolder does not contain a SecureContext.</B><BR>
|
||||||
This is an error and your container adapter will not operate properly until corrected.<BR><BR>
|
This is an error and your container adapter will not operate properly until corrected.<BR><BR>
|
||||||
<% }
|
<% }
|
||||||
} else { %>
|
} else { %>
|
||||||
<B>ContextHolder on ContextHolder is null.</B><BR>
|
<B>ContextHolder on ContextHolder is null.</B><BR>
|
||||||
This indicates improper setup of the container adapter. Refer to the reference documentation.<BR>
|
This indicates improper setup of the container adapter. Refer to the reference documentation.<BR>
|
||||||
Also ensure the correct subclass of AbstractMvcIntegrationInterceptor is being used for your container.<BR>
|
Also ensure the correct subclass of AbstractMvcIntegrationInterceptor is being used for your container.<BR>
|
||||||
<%}
|
<%}
|
||||||
%>
|
%>
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user