From 2a510f35395e8789637c622b672da1149eb45ca6 Mon Sep 17 00:00:00 2001
From: Luke Taylor
+ This happens because Tomcat sessions created under HTTPS cannot subsequently be used under HTTP and any session state is lost (including + the security context information). Starting in HTTP first should work. +
+This question comes up repeatedly in the Spring Security forum so you will find more information there.
++ The submitted login information is processed by an instance of AuthenticationProcessingFilter. You will need to customize this class to handle + the extra data field(s). One option is to use your own customized authentication token class (rather than the standard UsernamePasswordAuthenticatioToken), + another is simply to concatenate the extra fields with the username (for example, using a ":" as the separator) and pass them in the username property of + UsernamePasswordAuthenticatioToken. +
++ You will also need to customize the actual authentication process. If you are using a custom authentication token class, for example, you will have to write an + AuthenticationProvider to handle it (or extend the standard DaoAuthenticationProvider). + If you have concatenated the fields, you can implement your own UserDetailsService which splits them up and loads the appropriated user data to use + for authentication. +
+