https://github.com/dimmaryanto93/springboot2-oauth-sso-example
https://github.com/dimmaryanto93/springboot2-oauth-sso-example
authorization-code-grant authorization-server oauth2 password-flow springboot2
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/dimmaryanto93/springboot2-oauth-sso-example
- Owner: dimMaryanto93
- Created: 2018-08-29T09:57:11.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-08-30T22:44:27.000Z (almost 7 years ago)
- Last Synced: 2024-12-27T19:42:00.718Z (5 months ago)
- Topics: authorization-code-grant, authorization-server, oauth2, password-flow, springboot2
- Language: Java
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Springboot security Oauth2 - Enabled sso
## Fitur
- Flow grant type authorization code
- request code:
```bash
http://localhost:10000/oauth/authorize?grant_type=authorization_code&client_id=client-code&client_secret=123456&response_type=code&redirectUrl=http://localhost:10000
```
- request access token:
```bash
curl -X POST \
http://localhost:10000/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=BlTYTC'
```- Flow grant type password
```curl
curl -X POST \
http://localhost:10000/oauth/token \
-H 'Authorization: Basic Y2xpZW50LWNvZGU6MTIzNDU2' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'grant_type=password&client_id=client-code&username=user&password=password'
```