Skip to content

dimMaryanto93/springboot2-oauth-sso-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Springboot security Oauth2 - Enabled sso

Fitur

  • Flow grant type authorization code

    • request code:

      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:

      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 -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'