bill, password 로 로그인
그 후
Verifier code 생성 후 그 코드를 사용해 Challenge code 생성
그 후 XXX에 생성한 챌린지 코드 넣고 로그인한 페이지 URL에 입력후 엔터
http://localhost:8080/oauth2/authorize?response_type=code&client_id=client&scope=openid&redirect_uri=https://www.manning.com/authorized&code_challenge=XXX&code_challenge_method=S256
그리고 생성된 authorized 코드를 복사 한 후
https://www.manning.com/authorized?code=XXX
포스트맨에서 아래처럼 Verify code 와 authorized code 넣고 SEND 하면 완료
포스트맨
POST
http://localhost:8080/oauth2/token
{
"access_token": "eyJraWQiOiI0ODkyYWUzNy1jZTc3LTRlMzUtYjRhNi02NTFlY2ZmM2ZjYTgiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJiaWxsIiwiYXVkIjoiY2xpZW50IiwibmJmIjoxNzM0NDIxNzAxLCJzY29wZSI6WyJvcGVuaWQiXSwiaXNzIjoiaHR0cDovL2xvY2FsaG9zdDo4MDgwIiwiZXhwIjoxNzM0NDIyMDAxLCJwcmlvcml0eSI6IkhJR0giLCJpYXQiOjE3MzQ0MjE3MDF9.iPx_7jcDQZ3wNNWr1gjQ6DCIAZjOHJ4qOBLz8zEb0NAluMUxDaMCMXQfHuI3cQHiUJFlbQZltN9vGwD2SlJzFJRYkzfcs2SHHZH9h-tRGofVVL0U5DxVwrrxPSg8QZa1t1eYJV-Ej46VT7ep9HxxMuc4rJgPJOAoLMRnmI4cFr_passCGu9PujtuGobGFMvGGkFWJa16qOfV8crgYAgUeb-0SPDu0ZEYPzJTLWDLJS1BYm3IdbyJT4mDPNE8-U9EN3lYb_c1rZHGKGDZcwDf89scneMUCx99ATm6-x_EzpJN3eA7tJ36Ak7CZF7Gh6jEDQoO73mVQoNzuyk-s7Bc2Q",
"scope": "openid",
"id_token": "eyJraWQiOiI0ODkyYWUzNy1jZTc3LTRlMzUtYjRhNi02NTFlY2ZmM2ZjYTgiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJiaWxsIiwiYXVkIjoiY2xpZW50IiwiYXpwIjoiY2xpZW50IiwiYXV0aF90aW1lIjoxNzM0NDIxNDk1LCJpc3MiOiJodHRwOi8vbG9jYWxob3N0OjgwODAiLCJleHAiOjE3MzQ0MjM1MDEsInByaW9yaXR5IjoiSElHSCIsImlhdCI6MTczNDQyMTcwMSwic2lkIjoiclRMYVh2a2pVTHFrT3h5TTRYQ3JlZEw3RVcyTE8xeFN5c1NEQVNJYU10VSJ9.b0xOAk9PdQYUGNrJTlKfXdjJj9Bb7_xVClIYh1GvZ6ctSQ9J4pt3mLd_ah_eBXodoNoFo0hK2Q6uuGq554SDxZgXkERKbkrJUQ8Ow5mzkmEjP5RnHW71A1L8nVLPsxci0KdGGzXM4EwFmi8QdRoZmu7yt7eBcSyID72zrB6sFIqh4_EJjoV0QeYUUwrEbdltCzY9rZBtIfrFxu3Ygo98eME41XV3TBumanluO9CxX6ONgHmOk6ciY-JVAGXWMFOSmCRnW4jZyC0PkBvYAkYSEZNJJXgl0PHx1UMOsuHRbCsLmPZyPCq1lBTezitbgotshcPwXOdtregs_kXa16vm_g",
"token_type": "Bearer",
"expires_in": 299
}
curl -X POST 'http://localhost:8080/oauth2/token?client_id=client&grant_type=client_credentials' \
--header 'Authorization: Basic Y2xpZW50OnNlY3JldA=='
스프링부트 실행시키고 터미널에서 이 명령어로 바로 액세스 토큰 받을 수도 있다.