Secure you spring-boot apps by using OAuth2 (GitHub) SSO quickly (Servlet API / legacy)
- build and run:
./gradlew -p step-0-no-security clean build bootRun
- test:
curl 0:8080 http :8080
- build and run:
./gradlew -p step-1-basic-security clean build bootRun
- test:
curl -u ololo:trololo 0:8080 http -a ololo:trololo :8080
- create
./step-2-oauth2-sso-security/src/main/resources/application-github.properties
file with content like:this information can be fetched from you personal github account. you must create application for GitHub SSO.security.oauth2.client.clientId=bd1c0a783ccdd1c9b9e4 security.oauth2.client.clientSecret=1a9030fbca47a5b2c28e92f19050bb77824b5ad1
- build and run:
./gradlew -p step-2-oauth2-sso-security clean build bootRun
- open http://127.0.0.1:8080
- first time, you will be redirected on GitHub page for login
- after success auth you will see result
- next time you will be authenticated automatically