Java 17.0.1
Gradle
- Authorization Code Flow with Proof Key for Code Exchange (PKCE)
- Resource Owner Password Flow
- Client Credentials Flow
client
sever-authenticate
resource-server
https://github.com/spring-projects/spring-authorization-server
- Install MySQL( MySQL 8.0.23), MySQL WorkBench
- Create database with name "oauth2-db"
- Build and Run 3 Project above( data will automatic init in your database schema using Flyaway DB migration)
You should truncate 4 table in your database schema when you build and run the demo at 2nd, 3rd, 4th ,.. time
- oauth2_authorization
- oauth2_authorization_consent
- oauth2_registered_client
- oauth2_resource_data
resource-server-with-keycloak
- Download KeyCloak zip file if you want to use the newest version or you can use mine
- Start KeyCloack Authentication Server by commanline in cmd(Windown) or terminal(Linux or MacOs)
./kc.bat start-dev
./kc.sh start-dev
- Create admin account when you started first time
- Set up Realms, Client, Client Scope, User, you can find more infomation by those link below
Key Cloak
VIE
https://huongdanjava.com/vi/keycloak
SPRING BOOT BLOG
https://www.baeldung.com/spring-boot-keycloak
- Build and Run the
resource-server-with-keycloak
project