Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

20250205/jwt-authorization 박성민 기술 블로그 제출 #126

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

quickestfunctioning
Copy link

@quickestfunctioning quickestfunctioning commented Feb 5, 2025

JWT 토큰에 관련한 기본적인 학습 기술 블로그 제출합니다.

Copy link

@HongDaniel HongDaniel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

기술블로그 작성하느라 고생했습니다:)
리뷰한 내용보시고 수정 사항 반영하면 좋을 것 같아요.

---
# JWT란?

JWT(JSON Web Token)는 JSON 형식의 데이터를 이용해 사용자 인증 및 정보 교환을 안전하게 수행하는 토큰 기반 인증 방식입니다. JWT는 전자 서명을 포함하여 변조를 방지하며, 서버에서 세션을 유지하지 않고도 사용자 인증을 할 수 있도록 도와줍니다.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

여기서 표현을 좀 바꿔주면 좋을 것 같아요. JWT는 JSON 데이터를 Base64URL로 인코딩한 문자열 형태의 데이터를 이용해...가 좀 더 명확한 것 같아요. "JWT는 일반적으로 헤더.페이로드.서명 형태의 문자열로 표현되며, Base64로 인코딩됩니다." 이 부분을 여기 합치는 거죠

Comment on lines 33 to 39
#### 1. 사용자가 아이디와 비밀번호로 로그인 요청을 보냅니다.

#### 2. 서버에서 사용자의 인증 정보를 확인한 후 JWT를 생성합니다.

#### 3. 클라이언트는 JWT를 저장하고 이후 요청 시 Authorization 헤더에 포함하여 보냅니다.

#### 4. 서버는 클라이언트의 JWT를 검증한 후 요청을 처리합니다.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

어떤 부분이 인증이고 인가인지 표현해주면 좋을 것 같아요


### 단점

- 만료된 토큰 처리 어려움: 만료된 토큰을 강제 폐기하는 방법이 없음.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 부분이 어떤 뜻인지 잘 모르겠어요. 혹시 토큰 무효화의 어려움을 표현하고 싶었던거면 access token과 refresh token의 ttl 측면에서 좀 더 자세히 쓰면 좋을 것 같아요.

Copy link

@HongDaniel HongDaniel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

네 잘 작성하셨습니다 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants