I\'m trying to integrate the Spring Saml library in a sample webapplication, using Shibboleth as IDP. I\'m able to load the login page, to login and to show the index page.<
If you are not particular about using Spring, or you can try something that works first and move to Spring later, here is a good tutorial. I have tried this, it works:
http://fczaja.blogspot.com/2012/06/idp-initiated-sso-and-identity.html
The blog author Filip is very responsive, you can get clarifications from him if necessary.
I've experienced the same problem. After debugging realized that SecurityContext is cleared before it's persisted. After googling I found this: https://jira.springsource.org/browse/SEC-2027 Moving to spring security version 3.1.2 solved it for me.
I hope it will help someone.