Skip to content

Commit 3b773d8

Browse files
committed
주석 추가
1 parent 652f21e commit 3b773d8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/main/java/com/example/security/jwt/account/presentation/AccountController.java

+7-1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ public ResponseEntity<CommonResponse> refreshToken(@Valid @RequestBody RequestAc
6464
* Authorization : Bearer {AccessToken}
6565
* @AuthenticationPrincipal를 통해 JwtFilter에서 토큰을 검증하며 등록한 시큐리티 유저 객체를 꺼내옴
6666
* JwtFilter는 디비 조회 X
67+
* 토큰 유저 조회
6768
*/
6869
@GetMapping("/user")
6970
@PreAuthorize("hasAnyRole('MEMBER','ADMIN')") // USER, ADMIN 권한 둘 다 호출 허용
@@ -80,8 +81,13 @@ public ResponseEntity<CommonResponse> getMyUserInfo(@AuthenticationPrincipal Use
8081
return ResponseEntity.ok(response);
8182
}
8283

84+
/**
85+
* 해당 계정의 가중치를 1 올린다. -> 리플레쉬 토큰 무효
86+
* @param userName
87+
* @return
88+
*/
8389
@DeleteMapping("/{userName}/token")
84-
@PreAuthorize("hasAnyRole('ADMIN')") // ADMIN 권한만 호출 가능
90+
@PreAuthorize("hasAnyRole('ADMIN')")
8591
public ResponseEntity<CommonResponse> authorize(@PathVariable String userName) {
8692
accountService.invalidateRefreshTokenByUsername(userName);
8793
//응답

0 commit comments

Comments
 (0)