Maven error building SAMLToolkit Java web app/general Java integration guide

Hi I’m new to Okta. I’m responsible for migrating a Java web app that had been developed to integrate with OneLogin’s SAML idP over to Okta. I thought to get started I would work with the sample Hello World Java web app included in the SAMLToolkit-2.0.5.

Out of that work I have two questions. The first is, is anyone aware of a more step-by-step oriented guide for integrating a Java web app with Okta SAML IdP? I’m more of a Java developer than a SAML export and need to understand what is happening at each step along the way.

To be specific, the primary use case is that a user clicks on a link on the onelogin landing page and is directed to a .jsp in the application that processes the SAML token, etc. This is done with a call to methods of the onelogin library.

	Auth auth = new Auth(request, response);

It’s kind of a black box. It’s not clear what the comparable steps would be when using Okta. The secondary use case is that a user tries to login manually, and the application redirects to onelogin. Any advice would be appreciated.

Also, I launched Maven to build the sample web app and encountered the error shown below. I got past the error below using this thread

However the TESTS (Running TestSuite) blow up over am XML Parsing error. I will look for this error on the forum, but, an surprised that a basic demo app is so difficult to build based on errors that have been apparent for several months.

Error message

[ERROR] Failed to execute goal on project webapp: Could not resolve dependencies
for project com.okta:webapp:war:2.0.5-fa68307: Failed to collect dependencies a
t com.okta:saml-toolkit:jar:2.0.5-fa68307: Failed to read artifact descriptor fo
r com.okta:saml-toolkit:jar:2.0.5-fa68307: Could not transfer artifact com.okta:
saml-toolkit:pom:2.0.5-fa68307 from/to central-okta-topic (https://artifacts.aue Connect to [a] failed: Connection timed out: connect
-> [Help 1]

Thanks, All!

  • Gordon

Hey @grose!

I’d suggest using Spring Security directly (if you have a Spring app), take a look at: