<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
0D54z00008giV3jCAEOkta Classic EngineIntegrationsAnswered2023-01-20T20:02:45.000Z2023-01-19T11:08:03.000Z2023-01-20T20:02:45.000Z
Okta Saml with java Spring Boot

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))

    )


This question is closed.
Loading
Okta Saml with java Spring Boot