diff --git a/doc/src/site/resources/announcements/announcement-0.1.txt b/src/site/resources/announcements/announcement-0.1.txt similarity index 100% rename from doc/src/site/resources/announcements/announcement-0.1.txt rename to src/site/resources/announcements/announcement-0.1.txt diff --git a/doc/src/site/resources/announcements/announcement-0.2.txt b/src/site/resources/announcements/announcement-0.2.txt similarity index 100% rename from doc/src/site/resources/announcements/announcement-0.2.txt rename to src/site/resources/announcements/announcement-0.2.txt diff --git a/doc/src/site/resources/announcements/announcement-0.3.txt b/src/site/resources/announcements/announcement-0.3.txt similarity index 100% rename from doc/src/site/resources/announcements/announcement-0.3.txt rename to src/site/resources/announcements/announcement-0.3.txt diff --git a/doc/src/site/resources/announcements/announcement-0.4.txt b/src/site/resources/announcements/announcement-0.4.txt similarity index 100% rename from doc/src/site/resources/announcements/announcement-0.4.txt rename to src/site/resources/announcements/announcement-0.4.txt diff --git a/doc/src/site/resources/announcements/announcement-0.5.1.txt b/src/site/resources/announcements/announcement-0.5.1.txt similarity index 100% rename from doc/src/site/resources/announcements/announcement-0.5.1.txt rename to src/site/resources/announcements/announcement-0.5.1.txt diff --git a/doc/src/site/resources/announcements/announcement-0.5.txt b/src/site/resources/announcements/announcement-0.5.txt similarity index 100% rename from doc/src/site/resources/announcements/announcement-0.5.txt rename to src/site/resources/announcements/announcement-0.5.txt diff --git a/doc/src/site/resources/announcements/announcement-0.6.1.txt b/src/site/resources/announcements/announcement-0.6.1.txt similarity index 100% rename from doc/src/site/resources/announcements/announcement-0.6.1.txt rename to src/site/resources/announcements/announcement-0.6.1.txt diff --git a/doc/src/site/resources/announcements/announcement-0.6.txt b/src/site/resources/announcements/announcement-0.6.txt similarity index 100% rename from doc/src/site/resources/announcements/announcement-0.6.txt rename to src/site/resources/announcements/announcement-0.6.txt diff --git a/doc/src/site/resources/announcements/announcement-0.7.0.txt b/src/site/resources/announcements/announcement-0.7.0.txt similarity index 100% rename from doc/src/site/resources/announcements/announcement-0.7.0.txt rename to src/site/resources/announcements/announcement-0.7.0.txt diff --git a/doc/src/site/resources/announcements/announcement-0.7.1.txt b/src/site/resources/announcements/announcement-0.7.1.txt similarity index 100% rename from doc/src/site/resources/announcements/announcement-0.7.1.txt rename to src/site/resources/announcements/announcement-0.7.1.txt diff --git a/doc/src/site/resources/announcements/announcement-0.8.0.txt b/src/site/resources/announcements/announcement-0.8.0.txt similarity index 100% rename from doc/src/site/resources/announcements/announcement-0.8.0.txt rename to src/site/resources/announcements/announcement-0.8.0.txt diff --git a/doc/src/site/resources/announcements/announcement-0.8.1.1.txt b/src/site/resources/announcements/announcement-0.8.1.1.txt similarity index 100% rename from doc/src/site/resources/announcements/announcement-0.8.1.1.txt rename to src/site/resources/announcements/announcement-0.8.1.1.txt diff --git a/doc/src/site/resources/announcements/announcement-0.8.1.txt b/src/site/resources/announcements/announcement-0.8.1.txt similarity index 100% rename from doc/src/site/resources/announcements/announcement-0.8.1.txt rename to src/site/resources/announcements/announcement-0.8.1.txt diff --git a/doc/src/site/resources/announcements/announcement-0.8.2.txt b/src/site/resources/announcements/announcement-0.8.2.txt similarity index 100% rename from doc/src/site/resources/announcements/announcement-0.8.2.txt rename to src/site/resources/announcements/announcement-0.8.2.txt diff --git a/doc/src/site/resources/announcements/announcement-0.8.3.txt b/src/site/resources/announcements/announcement-0.8.3.txt similarity index 100% rename from doc/src/site/resources/announcements/announcement-0.8.3.txt rename to src/site/resources/announcements/announcement-0.8.3.txt diff --git a/doc/src/site/resources/announcements/announcement-0.9.0.txt b/src/site/resources/announcements/announcement-0.9.0.txt similarity index 100% rename from doc/src/site/resources/announcements/announcement-0.9.0.txt rename to src/site/resources/announcements/announcement-0.9.0.txt diff --git a/doc/src/site/resources/announcements/announcement-1.0.0 Final.txt b/src/site/resources/announcements/announcement-1.0.0 Final.txt similarity index 100% rename from doc/src/site/resources/announcements/announcement-1.0.0 Final.txt rename to src/site/resources/announcements/announcement-1.0.0 Final.txt diff --git a/doc/src/site/resources/announcements/announcement-1.0.0 RC1.txt b/src/site/resources/announcements/announcement-1.0.0 RC1.txt similarity index 100% rename from doc/src/site/resources/announcements/announcement-1.0.0 RC1.txt rename to src/site/resources/announcements/announcement-1.0.0 RC1.txt diff --git a/doc/src/site/resources/announcements/announcement-1.0.0 RC2.txt b/src/site/resources/announcements/announcement-1.0.0 RC2.txt similarity index 100% rename from doc/src/site/resources/announcements/announcement-1.0.0 RC2.txt rename to src/site/resources/announcements/announcement-1.0.0 RC2.txt diff --git a/src/site/resources/upgrade/upgrade-03-04.html b/src/site/xdoc/upgrade/upgrade-03-04.xml similarity index 80% rename from src/site/resources/upgrade/upgrade-03-04.html rename to src/site/xdoc/upgrade/upgrade-03-04.xml index ceb66fe29d..71007bc590 100644 --- a/src/site/resources/upgrade/upgrade-03-04.html +++ b/src/site/xdoc/upgrade/upgrade-03-04.xml @@ -1,16 +1,10 @@ - -
-Several changes were made between version 0.3 and 0.4 of the project.
+
+ Several changes were made between version 0.3 and 0.4 of the project.
These changes increased the modularity of the code, enhanced unit testing,
made package roles clearer, and added compelling alternatives to container
adapters and using web.xml security constraints to protect HTTP resources.
- Unfortunately, changes to the API and package locations were required. The
+ Unfortunately, changes to the API and package locations were required. The
following should help most casual users of the project update their
applications:
@@ -34,20 +28,21 @@ applications:
net.sf.acegisecurity.intercept.web package. This will give you considerably
more flexibility, and reuse the same concepts as you'd be familiar with
via the method security interception system. Refer to the reference
- documentation or Contacts sample application.
+ documentation or Contacts sample application.
+
We hope you find the new features useful in your projects.
-
-
+
+
+
The following should help most casual users of the project update their
+
+ The following should help most casual users of the project update their
applications:
+
There are also lots of new features you might wish to consider for your
projects. These include CAS integration, pluggable password encoders
(such as MD5 and SHA), along with pluggable salt sources. We hope you find
the new features useful in your projects.
-
-
+
+
+
@@ -48,12 +42,13 @@ applications:
Please continue using the Spring Users mailing list for general support.
-
+
+
The following should help most casual users of the project update their
applications:
@@ -21,31 +15,31 @@ Locate and remove all property references to
By default DaoAuthenticationProvider returns an Authentication object
containing the relevant User, which allows access to additional properties.
Where possible, we recommend you change your code to something like this,
- so that you can leave forcePrincipalAsString to the false default:
-
-
+
+
+
+ so that you can leave forcePrincipalAsString to the false default:
- String username = authentication.getPrincipal();
- if (authentication.getPrincipal() instanceof User) {
- username = ((User) authentication.getPrincipal()).getUsername();
- }
-
+ String username = authentication.getPrincipal();
+ if (authentication.getPrincipal() instanceof User) {
+ username = ((User) authentication.getPrincipal()).getUsername();
+ }
+
+ implementations, modify the User to UserDetails, as shown below:
- public User loadUserByUsername(String username)
Existing concrete implementations would be returning User, which implements
UserDetails, so no further code changes should be required.
- throws UsernameNotFoundException, DataAccessException {
+ public User loadUserByUsername(String username)
+ throws UsernameNotFoundException, DataAccessException {
- to:
+ to:
- public UserDetails loadUserByUsername(String username)
- throws UsernameNotFoundException, DataAccessException {
+ public UserDetails loadUserByUsername(String username)
+ throws UsernameNotFoundException, DataAccessException {
+ in web.xml match the following:
- <filter>
-
- <filter-name>Acegi Security System for Spring Auto Integration Filter</filter-name>
- <filter-class>net.sf.acegisecurity.util.FilterToBeanProxy</filter-class>
- <init-param>
- <param-name>targetClass</param-name>
- <param-value>net.sf.acegisecurity.ui.AutoIntegrationFilter</param-value>
- </init-param>
- </filter>
+ <filter>
+ <filter-name>Acegi Security System for Spring Auto Integration Filter</filter-name>
+ <filter-class>net.sf.acegisecurity.util.FilterToBeanProxy</filter-class>
+ <init-param>
+ <param-name>targetClass</param-name>
+ <param-value>net.sf.acegisecurity.ui.AutoIntegrationFilter</param-value>
+ </init-param>
+ </filter>
- Then add the following to applicationContext.xml:
+
+ Then add the following to applicationContext.xml:
- <bean id="autoIntegrationFilter" class="net.sf.acegisecurity.ui.AutoIntegrationFilter"/>
+ <bean id="autoIntegrationFilter" class="net.sf.acegisecurity.ui.AutoIntegrationFilter"/>
+
+
The following should help most casual users of the project update their
applications:
@@ -56,5 +50,6 @@ be correct.
Note the "cache" property is now required, and the old internally-managed
cache properties have been removed.
-
-
+
+
+
+
+
The following should help most casual users of the project update their
applications:
@@ -13,34 +7,35 @@ applications:
-
-
-
+
+
+
+
+
The following should help most casual users of the project update their
applications:
@@ -22,79 +16,80 @@ applications:
SecurityContextHolder and provides a single getter/setter for a
SecurityContext.
SecurityContextHolder
guarantees to never return a null
SecurityContext
.
- SecurityContext
provides single getter/setter for Authentication
.
+ SecurityContext
provides single getter/setter for Authentication
.
To migrate, simply modify all your code that previously worked with ContextHolder
,
SecureContext
and Context
to directly call SecurityContextHolder
and work with the SecurityContext
(instead of the now removed Context
- and SecureContext
interfaces).
+ and SecureContext
interfaces).
- For example, change:
+ For example, change:
- SecureContext ctx = SecureContextUtils.getSecureContext();
- to:
+ SecureContext ctx = SecureContextUtils.getSecureContext();
+ to:
- SecurityContext ctx = SecurityContextHolder.getContext();
-
+ SecurityContext ctx = SecurityContextHolder.getContext();
- and change:
+
+ and change:
- <bean id="httpSessionContextIntegrationFilter" class="net.sf.acegisecurity.context.HttpSessionContextIntegrationFilter">
- to:
- <property name="context"><value>net.sf.acegisecurity.context.security.SecureContextImpl</value></property>
- </bean>
+ <bean id="httpSessionContextIntegrationFilter" class="net.sf.acegisecurity.context.HttpSessionContextIntegrationFilter">
+ <property name="context"><value>net.sf.acegisecurity.context.security.SecureContextImpl</value></property>
+ </bean>
+ to:
- <bean id="httpSessionContextIntegrationFilter" class="net.sf.acegisecurity.context.HttpSessionContextIntegrationFilter">
-
- <property name="context"><value>net.sf.acegisecurity.context.SecurityContextImpl</value></property>
- </bean>
+ <bean id="httpSessionContextIntegrationFilter" class="net.sf.acegisecurity.context.HttpSessionContextIntegrationFilter">
+ <property name="context"><value>net.sf.acegisecurity.context.SecurityContextImpl</value></property>
+ </bean>
+
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 Context
implementations, your applications no longer need to perform checking of null
and
- unexpected Context
implementation types.
+ unexpected Context
implementation types.
AbstractProcessingFilter
has changed its getter/setter approach used for customised
authentication exception directions. See the
- AbstractProcessingFilter
JavaDocs to learn more.AbstractProcessingFilter
JavaDocs to learn more.
AnonymousProcessingFilter
now has a removeAfterRequest
property, which defaults to true
. 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 HttpSession
in HttpSessionContextIntegrationFilter
. You may
set this property to false if you would like the anoymous authentication token to be preserved,
- which would be an unusual requirement.
LoggerListener
has changed. See the net.sf.acegisecurity.event package
.
-
- For example, change:
+ LoggerListener
has changed. See the net.sf.acegisecurity.event package
.
+
+ For example, change:
- <bean id="loggerListener" class="net.sf.acegisecurity.providers.dao.event.LoggerListener"/>
- to:
+ <bean id="loggerListener" class="net.sf.acegisecurity.providers.dao.event.LoggerListener"/>
+ to:
- <bean id="loggerListener" class="net.sf.acegisecurity.event.authentication.LoggerListener"/>
-
+ <bean id="loggerListener" class="net.sf.acegisecurity.event.authentication.LoggerListener"/>
+
<authz:authentication>
JSP tag will generally need to set the operation
- property equal to "username", as reflection is now used to retrieve the property displayed.<authz:authentication>
JSP tag will generally need to set the operation
+ property equal to "username", as reflection is now used to retrieve the property displayed.net.sf.acegisecurity.wrapper.ContextHolderAwareRequestFilter
should note that it has been
- renamed to net.sf.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter
.
+ renamed to net.sf.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter
.
+ review the new configuration requirements.
+
+
The following should help most casual users of the project update their
applications:
-Changes 0.9.0 to RC1
-
-
+