f-lab-edu / f-lab-edu/janus

JWT 인증 필터 및 현재 사용자 조회

Open
#4 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

## 목적
로그인으로 발급한 JWT를 이후 요청에서 검증해, 보호 엔드포인트에 접근할 수 있어야 한다.

## 작업 범위
- [x] JWT 인증 필터 — 요청의 `Authorization: Bearer` 토큰 검증
- [x] 토큰 검증(서명·만료) 및 userId 추출 (`TokenVerifier`)
- [x] 발급/검증 키 빈 분리 (`JwtConfig`)
- [x] 현재 사용자 조회 (`GET /auth/me`)
- [x] 미인증 요청 401 일관 응답 (`AuthenticationEntryPoint`)
- [x] 단위/슬라이스/통합 테스트

## 완료 조건
- 유효한 토큰으로 `GET /auth/me` 호출 시 userId를 반환한다.
- 토큰이 없거나 무효·만료면 401을 반환한다.
- 만료 검증이 주입된 Clock 기준으로 동작한다(시계 고정 테스트 가능)

Contributor guide

No contributing guide indexed for this repository

Research direction

Locate the Java authentication entry points for TokenVerifier, JwtConfig, AuthenticationEntryPoint, and GET /auth/me, then read the existing unit, slice, and integration tests. Verify the request flow from Bearer-token extraction through userId lookup and Clock-based expiry checks. Done means valid tokens return userId and missing, invalid, or expired tokens consistently return 401.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, authentication, backend, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.