AuthCodewithPKCE

OAuth 2.0 Token Endpoint

Authorization Code with PKCE ํ๋ฆ„

img_61.png
img_62.png
img_63.png

์ฝ”๋“œ ํ๋ฆ„

์ฝ”๋“œ ์š”์ฒญ

img_65.png

1. ๊ณต๊ฐœ ํด๋ผ์ด์–ธํŠธ

1-1. ํ† ํฐ ์š”์ฒญ

img_64.png

1-2. OAuth2ClientAuthenticationFilter -> PublicClientAuthenticationConverter

  • ํ•„์š”ํ•œ ์ •๋ณด๋“ค์„ ์ถ”์ถœํ•ด์„œ OAuth2ClientAuthenticationToken์„ ๋ฐ˜ํ™˜ํ•œ๋‹ค.

img_66.png

1-3. ProviderManager -> PublicClientAuthenticationProvider

  • ์ตœ์ข… OAuth2ClientAuthenticationToken์„ ๋ฐ˜ํ™˜ํ•˜๊ธฐ ์ „์— codeVerifierAuthenticator๋ฅผ ํ†ตํ•ด ๊ฒ€์ฆ์„ ํ•œ๋‹ค.

img_67.png

1-4. OAuth2TokenEndpointFilter -> ... -> sendAccessTokenResponse

img_68.png

2. ๊ธฐ๋ฐ€ ํด๋ผ์ด์–ธํŠธ

2-1. ํ† ํฐ ์š”์ฒญ

img_69.png

2.2 OAuth2ClientAuthenticationFilter -> ClientSecretPostAuthenticationConverter

img_70.png

2.3 ProviderManager -> ClientSecretAuthenticationProvider

  • ๊ธฐ๋ฐ€ ํด๋ผ์ด์–ธํŠธ๋ผ ํ•˜๋”๋ผ๋„ PKCE ๊ธฐ๋Šฅ์„ ์‚ฌ์šฉํ–ˆ๋‹ค๋ฉด PKCE ์ธ์ฆ๋„ ํ†ต๊ณผํ•ด์•ผ ์ •์ƒ์ ์œผ๋กœ ํ† ํฐ์„ ๋ฐœ๊ธ‰๋ฐ›์„ ์ˆ˜ ์žˆ๋‹ค.

img_71.png

2.4 OAuth2TokenEndpointFilter -> ... -> sendAccessTokenResponse

img_72.png

Last updated