
User16660261248999665974 (Customer) asked a question.
We have a requirement on integrating spring boot with okta saml so we used the code ref from (https://developer.okta.com/blog/2022/08/05/spring-boot-saml ,), But in
http
.authorizeHttpRequests
we are facing the below mentioned error.
- (The method authorizeHttpRequests((<no type> authorize) -> {}) is undefined for the type HttpSecurity )
while our client side they were using spring-boot-starter-parent version as 2.1.5.RELEASE after changing the version to 2.7.7 we can eradicate the issue but on the other hand we can't be able to deploy the code with error as below.
- Failed to instantiate [org.springframework.security.web.SecurityFilterChain]: Factory method 'configure' threw exception; nested exception is java.lang.LinkageError: loader constraint violation: loader (instance of org/jboss/modules/ModuleClassLoader) previously initiated loading for a different type with name "javax/xml/namespace/QName"
so can we alter the below code to compensate with spring-boot-starter-parent 2.1.5.RELEASE
http
.authorizeHttpRequests(authorize -> authorize
.antMatchers( "/valid/**").permitAll()
.anyRequest().authenticated()
)
.saml2Login(saml2 -> saml2
.authenticationManager(new ProviderManager(authenticationProvider))
)

Hello @User16660261248999665974 (Customer) Thank you for reacting out to our Community!
Please see this article that seems to address this issue:
https://devforum.okta.com/t/okta-spring-boot-starter-unable-to-resolve-configuration-with-provided-issuer-of/13250
If this does not help, my advice would be to leverage the Okta Developer forums for this type of questions and take advantage of their expertise.
https://devforum.okta.com/
The Okta Community Catalysts Program is now live. Collect online badges when you participate in the Okta Help Center Questions community. Learn more here.
Community members help others by clicking Upvote or Select as Best on responses. Try it today.