I have a little problem with an ADFS SSO and Spring Security integration.
The SSO Login works fine but when the Authentication Object is stored in session handled by Spring Security is of type ExpiringUsernameAuthenticationToken instead of UsernamePasswordAuthenticationToken even if It's a direct subclass, the problem is that The current user bound by @AuthenticationPrincipal into Controller methods is null.
I've implemented a SAMLUserDetailsService where I return a full UserDetails object.
Fork the sake of completness I've a full UserDetails user into Principal property of UsernamePasswordAuthenticationToken but only a String with "firstname lastname" into the same Principal object into ExpiringUsernameAuthenticationToken.
How can I solve this? Thanks in advance and sorry for my english.