I have been struggling to get waffle to work with spring 4.2.5 using spring java configuration. And I thought I might as well help others in the same situation.
We use a custom preWaffle and postWaffle filter to authenticate that the user exists in our database after it has been validated via waffles NTLM protocol.
We also have methods for authorization of a user actions using the EnableGlobalMethodSecurity annotation.
To get this working in spring java configuration was trouble some to say the least. You can find our solution in the answer below. I hope it will help.
SpringConfiguration.java
SecurityConfiguration.java
To be able to autowire the waffle authProvider I created the following wrapperclass.
WindowsAuthenticationProviderWrapper.java
As requested (Some code has been stripped due to security risks).
CustomPreAuthFilter.java
CustomNegotiateSecurityFilter.java
EDIT
For those who asked about here is one implementation. CustomServletRequestWrapper:
If you need more information don't hessitate to ask.