Skip to content

Conversation

@sungchaewon
Copy link
Member

@sungchaewon sungchaewon commented Jun 22, 2025

이슈 번호

작업 내용

기타

Summary by CodeRabbit

  • 신규 기능
    • 로그아웃을 위한 POST 엔드포인트가 추가되어, 토큰 형식을 확인하고 정상적으로 로그아웃 처리 시 안내 메시지를 제공합니다.
  • 버그 수정
    • 로그인 시 탈퇴한 회원의 경우 로그인이 불가하도록 처리되었습니다.
  • 기타
    • 로그아웃 성공 및 탈퇴 회원 관련 안내 메시지가 추가되었습니다.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jun 22, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

이 변경 사항은 인증 컨트롤러에 로그아웃 엔드포인트를 추가하고, 오류 코드 Enum에 새로운 상수를 도입하며, 로그인 서비스에서 탈퇴 회원에 대한 검증 로직을 추가합니다. 로그아웃은 토큰 형식만 확인하고, 서버 측 세션 무효화는 수행하지 않습니다.

Changes

파일/경로 변경 요약
.../controller/AuthController.java /logout POST 엔드포인트 추가, 토큰 형식 검증 및 응답 처리 추가
.../exception/ErrorCode.java USER_DELETED, LOGOUT_SUCCESS 오류 코드 Enum 상수 2개 추가
.../service/AuthService.java 로그인 시 탈퇴 회원(isDeleted) 검증 및 예외 처리 로직 추가

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant AuthController
    participant AuthService
    participant MemberRepository

    Client->>AuthController: POST /login (email, password)
    AuthController->>AuthService: login(email, password)
    AuthService->>MemberRepository: findByEmail(email)
    MemberRepository-->>AuthService: Member
    AuthService->>AuthService: isDeleted 체크
    alt isDeleted == true
        AuthService-->>AuthController: throw USER_DELETED 예외
        AuthController-->>Client: 403 Forbidden, "탈퇴한 회원입니다."
    else isDeleted == false
        AuthService->>AuthService: 비밀번호 검증 및 토큰 생성
        AuthService-->>AuthController: 토큰 등 반환
        AuthController-->>Client: 로그인 성공 응답
    end
Loading
sequenceDiagram
    participant Client
    participant AuthController

    Client->>AuthController: POST /logout (Authorization 헤더)
    alt Authorization 헤더가 "Bearer "로 시작
        AuthController-->>Client: 200 OK, "로그아웃이 정상적으로 처리되었습니다."
    else
        AuthController-->>Client: 400 Bad Request, UNAUTHORIZED 메시지
    end
Loading

Poem

🐰
로그아웃 버튼 꾹 눌렀더니
토큰 확인, 깔끔한 마무리!
탈퇴 회원도 이제는 안녕—
에러 코드 늘어나고,
서비스는 더 안전해졌네!
토끼는 오늘도 깡총깡총,
코드를 품고 춤추네!


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d2d3fe5 and 3d51104.

📒 Files selected for processing (3)
  • src/main/java/com/example/FixLog/controller/AuthController.java (2 hunks)
  • src/main/java/com/example/FixLog/exception/ErrorCode.java (2 hunks)
  • src/main/java/com/example/FixLog/service/AuthService.java (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@sungchaewon sungchaewon merged commit 07170a4 into main Jun 22, 2025
1 of 2 checks passed
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