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

LoginInterceptor 개선 #1622

Merged
merged 4 commits into from
Nov 23, 2023
Merged

LoginInterceptor 개선 #1622

merged 4 commits into from
Nov 23, 2023

Conversation

BGuga
Copy link
Contributor

@BGuga BGuga commented Nov 23, 2023

#️⃣연관된 이슈

#1612

📝작업 내용

@GetMapping("/sessions/{sessionId}/keywords/{keywordId}/quizs/{quizId}")
    public ResponseEntity<QuizResponse> findQuizById(@PathVariable Long quizId,
        @AuthMemberPrincipal LoginMember member) {
        return ResponseEntity.ok(quizService.findById(quizId, member.getId()));
    }

@DeleteMapping("/sessions/{sessionId}/keywords/{keywordId}/quizs/{quizId}")
    public ResponseEntity<Void> deleteQuiz(@PathVariable Long sessionId,
                                           @PathVariable Long keywordId,
                                           @PathVariable Long quizId) {
        quizService.deleteQuiz(quizId);
        return ResponseEntity.noContent().build();
    }

위와 같은 상황에서 Delete method에서도 로그인 검증이 일어나는 문제가 있었습니다.
이를 MethodPattern 이란 객체를 생성하여 메서드와 uri 두 가지가 만족해야 검증하도록 변경했습니다.

Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

67.6% 67.6% Coverage
0.0% 0.0% Duplication

warning The version of Java (11.0.21) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
Read more here

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@BGuga BGuga self-assigned this Nov 23, 2023
@BGuga BGuga added the BE label Nov 23, 2023
@BGuga BGuga merged commit ab5cc4c into develop Nov 23, 2023
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant