Skip to content

musabbozkurt/oauth2-authorization-server

Repository files navigation

OAuth2 Authorization Server with Spring Boot 3 and Java 21

Prerequisites

  • Java 21 should be installed --> export JAVA_HOME=$(/usr/libexec/java_home -v 21)
  • Maven should be installed
  • Docker should be installed
  • Postman can be installed

How to Run and Test

  • Run mvn test or mvn clean install or mvn clean package command to run all the tests
  • mvn spring-boot:run
  • Import OAuth2 Authorization Server.postman_collection.json
  • Swagger: http://localhost:9000/swagger-ui/index.html
    • Click Authorize and enter the following credentials
    • client_id: client
    • client_secret: secret
    • Use one of the following default values to log in http://localhost:9000/login
      • username: Developer password: password
      • username: Admin password: password
      • username: User password: password
  • Database credentials
    • url: jdbc:mariadb://localhost:3306/oauth2_authorization_server
    • username: mb_test
    • password: test

References