|
|
@@ -1,11 +1,5 @@
|
|
|
-<html>
|
|
|
-<head>
|
|
|
-<title>Acegi Security - Upgrading from version 0.8.0 to 0.9.0</title>
|
|
|
-</head>
|
|
|
-<body>
|
|
|
-<h1>Upgrading from 0.8.0 to 0.9.0</h1>
|
|
|
-
|
|
|
-<p>
|
|
|
+<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
|
+<document><properties><title>Acegi Security - Upgrading from version 0.8.0 to 0.9.0</title></properties><body><section name="Upgrading from 0.8.0 to 0.9.0"><p>
|
|
|
The following should help most casual users of the project update their
|
|
|
applications:
|
|
|
|
|
|
@@ -22,79 +16,80 @@ applications:
|
|
|
SecurityContextHolder</a> and provides a single getter/setter for a
|
|
|
<a href="../multiproject/acegi-security/xref/net/sf/acegisecurity/context/SecurityContextHolder.html">SecurityContext</a>.
|
|
|
<code>SecurityContextHolder</code> guarantees to never return a <code>null</code> <code>SecurityContext</code>.
|
|
|
- <code>SecurityContext</code> provides single getter/setter for <code>Authentication</code>.<BR><BR>
|
|
|
+ <code>SecurityContext</code> provides single getter/setter for <code>Authentication</code>.<br></br><br></br>
|
|
|
|
|
|
To migrate, simply modify all your code that previously worked with <code>ContextHolder</code>,
|
|
|
<code>SecureContext</code> and <code>Context</code> to directly call <code>SecurityContextHolder</code>
|
|
|
and work with the <code>SecurityContext</code> (instead of the now removed <code>Context</code>
|
|
|
- and <code>SecureContext</code> interfaces).<br><br>
|
|
|
+ and <code>SecureContext</code> interfaces).<br></br><br></br>
|
|
|
|
|
|
- For example, change:<br>
|
|
|
+ For example, change:<br></br>
|
|
|
<code>
|
|
|
- SecureContext ctx = SecureContextUtils.getSecureContext();<br>
|
|
|
+ SecureContext ctx = SecureContextUtils.getSecureContext();<br></br>
|
|
|
</code>
|
|
|
- to:<br>
|
|
|
+ to:<br></br>
|
|
|
<code>
|
|
|
- SecurityContext ctx = SecurityContextHolder.getContext();<br>
|
|
|
+ SecurityContext ctx = SecurityContextHolder.getContext();<br></br>
|
|
|
</code>
|
|
|
- <br>
|
|
|
- and change:<br>
|
|
|
+ <br></br>
|
|
|
+ and change:<br></br>
|
|
|
<code>
|
|
|
- <bean id="httpSessionContextIntegrationFilter" class="net.sf.acegisecurity.context.HttpSessionContextIntegrationFilter"><br>
|
|
|
- <property name="context"><value>net.sf.acegisecurity.context.security.SecureContextImpl</value></property><br>
|
|
|
- </bean><br>
|
|
|
+ <bean id="httpSessionContextIntegrationFilter" class="net.sf.acegisecurity.context.HttpSessionContextIntegrationFilter"><br></br>
|
|
|
+ <property name="context"><value>net.sf.acegisecurity.context.security.SecureContextImpl</value></property><br></br>
|
|
|
+ </bean><br></br>
|
|
|
</code>
|
|
|
- to:<br>
|
|
|
+ to:<br></br>
|
|
|
<code>
|
|
|
- <bean id="httpSessionContextIntegrationFilter" class="net.sf.acegisecurity.context.HttpSessionContextIntegrationFilter"><br>
|
|
|
- <property name="context"><value>net.sf.acegisecurity.context.SecurityContextImpl</value></property><br>
|
|
|
- </bean><br>
|
|
|
+ <bean id="httpSessionContextIntegrationFilter" class="net.sf.acegisecurity.context.HttpSessionContextIntegrationFilter"><br></br>
|
|
|
+ <property name="context"><value>net.sf.acegisecurity.context.SecurityContextImpl</value></property><br></br>
|
|
|
+ </bean><br></br>
|
|
|
</code>
|
|
|
- <br>
|
|
|
+ <br></br>
|
|
|
|
|
|
We apologise for the inconvenience, but on a more positive note this means you receive strict
|
|
|
type checking, you no longer need to mess around with casting to and from <code>Context</code>
|
|
|
implementations, your applications no longer need to perform checking of <code>null</code> and
|
|
|
- unexpected <code>Context</code> implementation types.<br><br></li>
|
|
|
+ unexpected <code>Context</code> implementation types.<br></br><br></br></li>
|
|
|
|
|
|
<li><code>AbstractProcessingFilter</code> has changed its getter/setter approach used for customised
|
|
|
authentication exception directions. See the <a href="../multiproject/acegi-security/xref/net/sf/acegisecurity/ui/AbstractProcessingFilter.html">
|
|
|
- <code>AbstractProcessingFilter</code> JavaDocs</a> to learn more.<br><br></li>
|
|
|
+ <code>AbstractProcessingFilter</code> JavaDocs</a> to learn more.<br></br><br></br></li>
|
|
|
|
|
|
<li><code>AnonymousProcessingFilter</code> now has a <code>removeAfterRequest</code> property, which defaults to <code>true</code>. This
|
|
|
will cause the anonymous authentication token to be set to null at the end of each request, thus
|
|
|
avoiding the expense of creating a <code>HttpSession</code> in <code>HttpSessionContextIntegrationFilter</code>. You may
|
|
|
set this property to false if you would like the anoymous authentication token to be preserved,
|
|
|
- which would be an unusual requirement.<br><br></li>
|
|
|
+ which would be an unusual requirement.<br></br><br></br></li>
|
|
|
|
|
|
<li>Event publishing has been refactored. New event classes have been added, and the location of
|
|
|
- <code>LoggerListener</code> has changed. See the <code>net.sf.acegisecurity.event package</code>.<BR>
|
|
|
- <br>
|
|
|
- For example, change:<br>
|
|
|
+ <code>LoggerListener</code> has changed. See the <code>net.sf.acegisecurity.event package</code>.<br></br>
|
|
|
+ <br></br>
|
|
|
+ For example, change:<br></br>
|
|
|
<code>
|
|
|
- <bean id="loggerListener" class="net.sf.acegisecurity.providers.dao.event.LoggerListener"/><br>
|
|
|
+ <bean id="loggerListener" class="net.sf.acegisecurity.providers.dao.event.LoggerListener"/><br></br>
|
|
|
</code>
|
|
|
- to:<br>
|
|
|
+ to:<br></br>
|
|
|
<code>
|
|
|
- <bean id="loggerListener" class="net.sf.acegisecurity.event.authentication.LoggerListener"/>
|
|
|
- </code><br><br>
|
|
|
+ <bean id="loggerListener" class="net.sf.acegisecurity.event.authentication.LoggerListener"/>
|
|
|
+ </code><br></br><br></br>
|
|
|
</li>
|
|
|
|
|
|
- <li>Users of the <code><authz:authentication></code> JSP tag will generally need to set the <code>operation</code>
|
|
|
- property equal to "username", as reflection is now used to retrieve the property displayed.<br><br></li>
|
|
|
+ <li>Users of the <code><authz:authentication></code> JSP tag will generally need to set the <code>operation</code>
|
|
|
+ property equal to "username", as reflection is now used to retrieve the property displayed.<br></br><br></br></li>
|
|
|
|
|
|
<li>
|
|
|
Users of <code>net.sf.acegisecurity.wrapper.ContextHolderAwareRequestFilter</code> should note that it has been
|
|
|
- renamed to <code>net.sf.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter</code>.<br><br>
|
|
|
+ renamed to <code>net.sf.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter</code>.<br></br><br></br>
|
|
|
</li>
|
|
|
|
|
|
<li>
|
|
|
The concurrent session support handling has changed. Please refer to the Reference Guide to
|
|
|
- review the new configuration requirements.<br><br>
|
|
|
+ review the new configuration requirements.<br></br><br></br>
|
|
|
</li>
|
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
-</body>
|
|
|
-</html>
|
|
|
+
|
|
|
+
|
|
|
+</p></section></body></document>
|