Okta setup example for Legacy Spring Application (No Spring Boot)

Hello,
We are looking for documentation/tutorials about setting up Okta with Legacy Spring Application (No Spring Boot). Just like for Spring Boot we have in GitHub - okta/okta-spring-boot: Okta Spring Boot Starter Official Okta GitHub Repository which contains all the steps for Okta modules configuration, properties, Java Config.
We have tried various ways of finding that but It’s really hard to find especially for Legacy Spring App, almost all solutions found throughout the internet are for Spring Boot.

I also found this topic: Spring configuration without Spring boot but it’s doesn’t work as mentioned.

So still is there any sure way for that or do we need to migrate our legacy spring app to spring boot. (This is a huge task for a large project).
Please Suggest Alternatives and Solutions.

1 Like

I had the same challenge when I did a POC, 2 years back. We were using Spring namespace XML (version 4.3) and not Sprint boot. All the examples, I found were were in Spring boot. Infact, I found that features like oauth2Login, etc that were available in Spring boot were not even there in Spring XML namespace Provide XML namespace support for OAuth2Login · Issue #4557 · spring-projects/spring-security · GitHub . It has been added in Spring security in recent versions of Spring security release Add XML namespace support for oauth2Login() by jgrandja · Pull Request #7743 · spring-projects/spring-security · GitHub
if upgrade is an option, I would probably start from there i.e. upgrade the Spring security version to the latest (warning - it might break something else, so it might still be a big effort).
Though I was able to configure it within my Spring 4.3 version of the application, It took couple of sleepless nights in order to achieve it. As it was just a POC, I don’t have it handy. But I’ll try to find it and share the notes or snippets with you.

1 Like

Hi there, I also have the same task, I have to integrate okta to a Spring application (not boot) that handles its authentication with spring security. All the examples I find are with Spring Boot, but I need to do the integration with Spring and Spring Security, using Okta’s hosted interface. Would you be so kind to tell me if you were able to replicate it? or if you have support material it would be very helpful. Thanks in advance.