Running and testing the application

Navigate to your project folder and execute the spring-boot command, as follows:

mvn spring-boot:run

Open a browser and navigate to https://localhost:8443. Please note the https and the port 8443 (because we have SSL enabled). If you don't put https in your URL, you will get the following response:

Figure 1: Browser response when HTTP is used

The browser will show a page stating that Your connection is not secure. The message may vary, depending on the browser that you choose to open this URL. Just make sure that you accept the risks and move forward.

You will be navigated to the Okta URL, asking you to log in using your username/password, as shown in the following screenshot:

Figure 2: Okta login page shown to the user

Once it's done, you will be navigated back to the home page, showing what you have put in your home.jsp file. The next time you open the URL, you will be taken directly to the home page, and Okta will automatically sign you in.

This completes SAML authentication using Spring Security. You can see the full project by accessing the GitHub page and navigating to the spring-boot-in-memory-saml2-authentication project.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
52.15.210.255