https://github.com/dimmaryanto93/springboot-oauth2-sso-example
Spring security oauth2 Authorization and Resource Server
https://github.com/dimmaryanto93/springboot-oauth2-sso-example
auth-server authorization oauth2 oauth2-server springboot sso
Last synced: 12 days ago
JSON representation
Spring security oauth2 Authorization and Resource Server
- Host: GitHub
- URL: https://github.com/dimmaryanto93/springboot-oauth2-sso-example
- Owner: dimMaryanto93
- Created: 2018-07-24T08:31:10.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-30T10:11:45.000Z (almost 8 years ago)
- Last Synced: 2025-05-18T10:06:19.677Z (about 1 year ago)
- Topics: auth-server, authorization, oauth2, oauth2-server, springboot, sso
- Language: Java
- Size: 7.81 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Spring Security - Oauth2 SSO example
Belajar Web Security dengan fitur single sign on (SSO)
- Fitur Grant type Authorization code
- request code : [klick disini](http://localhost:8080/oauth/authorize?grant_type=authorization_code&client_id=client-code&client_secret=123456&redirectUrl=http://localhost:8080/&response_type=code)
```bash
http://localhost:8080/oauth/authorize?grant_type=authorization_code&client_id=client-code&client_secret=123456&redirectUrl=http://localhost:8080/&response_type=code
```
- request token :
```bash
curl -X POST \
http://localhost:8080/oauth/token \
-H 'Authorization: Basic Y2xpZW50LWNvZGU6MTIzNDU2' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'grant_type=authorization_code&code=1HQ2Gh'
```
- Fitur Grant type Password
```bash
curl -X POST \
'http://localhost:8080/oauth/token?grant_type=password&client_id=client-code&username=user&password=password' \
-H 'Authorization: Basic Y2xpZW50LWNvZGU6MTIzNDU2' \
-H 'Postman-Token: f2b78553-073a-46c7-8a3e-dca6ccdc1fef'
```