Skip to content

Commit

Permalink
feat: final 키워드 적용하여 요청 값 불변성 보장 #8
Browse files Browse the repository at this point in the history
  • Loading branch information
PgmJun committed Jan 19, 2024
1 parent 74b8a74 commit 228e617
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class CommonAuthService {

private final JwtUtils jwtUtils;

public void logout(Long memberId) {
public void logout(final Long memberId) {
Member member = MemberServiceUtils.findMemberById(memberRepository, memberId);
jwtUtils.expireRefreshToken(member.getId());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public TokenVO createTokenInfo(Long memberId) {
return TokenVO.of(tokens.get(0), tokens.get(1));
}

public TokenVO reissueToken(TokenVO tokenVO) {
public TokenVO reissueToken(final TokenVO tokenVO) {
Long memberId = jwtUtils.parseMemberId(tokenVO.getAccessToken())
.orElseThrow();
Member member = MemberServiceUtils.findMemberById(memberRepository, memberId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
@Builder(access = AccessLevel.PRIVATE)
public class TokenVO {

private String accessToken;
private String refreshToken;
private String accessToken;
private String refreshToken;

public static TokenVO of(String accessToken, String refreshToken) {
return TokenVO.builder()
.accessToken(accessToken)
.refreshToken(refreshToken)
.build();
}
public static TokenVO of(final String accessToken, final String refreshToken) {
return TokenVO.builder()
.accessToken(accessToken)
.refreshToken(refreshToken)
.build();
}
}

0 comments on commit 228e617

Please sign in to comment.