Skip to content

Latest commit

 

History

History
26 lines (22 loc) · 1.53 KB

File metadata and controls

26 lines (22 loc) · 1.53 KB

FusionAuth Spring Security Example

A quick and easy example of how to use OpenId Connect to integrate a spring application with FusionAuth.

Usage

  1. Download and install FusionAuth
  2. Create an Application
    1. While you are creating an application, create two roles user and admin
    2. Add a valid redirect URL to your OAuth configuration. For this example use http://localhost:8081/login.
    3. Add http://localhost:8081/logout as the logout url.
    4. Click save (blue icon at the top right)
  3. Copy application-example.properties to application.properties
  4. Copy your Client id and Client secret from the Application configuration into application.properties under the fusionAuth.clientId and fusionAuth.clientSecret properties (respectively).
  5. Copy your FusionAuth Application ID into fusionAuth.applicationId
  6. Modify the existing localhost:9011 urls to be the location of your fusion auth instance if it is not running locally.
  7. Start the example with mvn spring-boot:run and navigate to http://localhost:8081

For an in depth explanation and tutorial checkout our blog.

License

Some portions of this code were forked/based on the code available here: https://github.com/eugenp/tutorials which are licensed under MIT. The full license is available under LICENSE.