Spring-security-saml-dsl without Spring Boot

I’ve got this example to work. https://developer.okta.com/blog/2017/03/16/spring-boot-saml

I have an legacy app that I would like to secure the REST endpoints. Backend is a standard Springframework app that is deployed to Tomcat.

Have anyone gotten it to work?

I’ve got it mostly working, app allows me to login through Okta then I am getting this error
HTTP Status 401 - Authentication Failed: Incoming SAML message is invalid

I believe the error is from SAMLProcessingFilter.java -> SAMLProcessorImpl.java line 105.

Am I missing some configuration or some dependency?

I am using the SecurityConfiguration.java from the example.

Here is a web.xml:





Here is the applicationsContext.xml

<context:component-scan base-package="com.example"/>
<context:component-scan base-package="org.springframework.security.saml"/>

Can you share what you have done to get spring-security-saml-dsl to work without spring boot to authenticate users with Okta? We also have legacy spring apps with spring mvc/jsp. Examples are much appreciated!