Skip to content

Commit

Permalink
🩹 네이밍 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
daangn-william authored and rilac1 committed Apr 2, 2023
1 parent 421262a commit cf54566
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package yapp.allround3.auth.jwt;

import java.io.IOException;

import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.web.filter.OncePerRequestFilter;
Expand All @@ -21,10 +19,10 @@ public class JwtAuthenticationFilter extends OncePerRequestFilter {
protected void doFilterInternal(
HttpServletRequest request,
HttpServletResponse response,
FilterChain filterChain) {

FilterChain filterChain
) {
try {
String accessToken = JwtHeaderUtil.getAccessToken(request);
String accessToken = JwtHeaderUtil.getAppToken(request);
AuthToken token = tokenProvider.convertAuthToken(accessToken);

Authentication authentication = tokenProvider.getAuthentication(token);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/yapp/allround3/auth/jwt/JwtHeaderUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public static String getCode(HttpServletRequest request) {
.orElseThrow(() -> new CustomException("The header does not contain code"));
}

public static String getAccessToken(HttpServletRequest request) {
public static String getAppToken(HttpServletRequest request) {
String headerValue = request.getHeader(HEADER_AUTHORIZATION);

if (headerValue == null || !headerValue.startsWith(TOKEN_PREFIX)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public boolean preHandle(
}

try {
String appToken = JwtHeaderUtil.getAccessToken(request);
String appToken = JwtHeaderUtil.getAppToken(request);
Member member = jwtService.getMemberFromAppToken(appToken);

request.setAttribute("memberId", member.getId());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public void drop() {
@Override
public String toString() {
return "Participant{" +
"id=" + id +
"oauthId=" + id +
", project=" + project.getId() +
", member=" + member.getId() +
", leader=" + leader +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public CustomResponse<List<ProjectResponse>> findProjectsByMember(
.findParticipantsByProject(project).stream()
.map(ParticipantDto::of)
.toList();
//추후 내 task 조회를 위해 나의 해당 프로젝트 참여자 id 필드 추가
//추후 내 task 조회를 위해 나의 해당 프로젝트 참여자 oauthId 필드 추가
Long myParticipantId = projectService.findMyParticipantId(member, project);
return ProjectResponse.of(project, myParticipantId, participantDtos);
}).toList();
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/yapp/allround3/task/domain/Task.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public void subtractFeedbackRequiredPersonnel(){
@Override
public String toString() {
return "Task{" +
"id=" + id +
"oauthId=" + id +
", startDate=" + startDate +
", dueDate=" + dueDate +
", title='" + title + '\'' +
Expand Down

0 comments on commit cf54566

Please sign in to comment.