Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

FusionAuth/fusionauth-example-spring-security

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FusionAuth Spring Security Example

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

DEPRECATED

This repository is no longer maintained. For a modern example of integrating Spring and FusionAuth, please see https://github.com/FusionAuth/fusionauth-example-java-spring

DEPRECATED

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.