Notice
Recent Posts
Recent Comments
Link
목록JWT (1)
SKSDUD

토큰 기반 자격 증명 방식 구현 파트를 맡아서 진행하고 있다. 와중에 만난 에러를 해결했던 기록을 남기면서 개념 복습도 해보도록 하겠다. package com.codestates.member.service; // 로그인한 사용자가 회원 본인인지 또는 관리자인지 확인하는 메서드이다. private void verifyAuthorizedMember(Long memberId) { // 사용자 인증 정보 Authentication의 인스턴스 auth로 접근 Authentication auth = SecurityContextHolder.getContext().getAuthentication(); // 인증되지 않은 사용자인 경우 예외 처리 if (!auth.isAuthenticated()) { throw new ..
카테고리 없음
2023. 5. 10. 23:50