Skip to content

Commit

Permalink
#1 Fix: delete grantType
Browse files Browse the repository at this point in the history
  • Loading branch information
5jisoo committed Feb 10, 2024
1 parent c2bc982 commit 4decd4a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@
public class AuthTokens {
private String accessToken;
private String refreshToken;
private String grantType;
private Long expiresIn;

public static AuthTokens of(String accessToken, String refreshToken, String grantType, Long expiresIn) {
return new AuthTokens(accessToken, refreshToken, grantType, expiresIn);
public static AuthTokens of(String accessToken, String refreshToken, Long expiresIn) {
return new AuthTokens(accessToken, refreshToken, expiresIn);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
@Component
@RequiredArgsConstructor
public class AuthTokensGenerator {
private static final String BEARER_TYPE = "Bearer";
private static final long ACCESS_TOKEN_EXPIRE_TIME = 1000 * 60 * 60 * 5; // 5 Hour
private static final long REFRESH_TOKEN_EXPIRE_TIME = 1000 * 60 * 60 * 24 * 7; // 7 Day

Expand All @@ -33,7 +32,7 @@ public AuthTokens generate(Long memberId) {
String accessToken = jwtTokenProvider.generate(subject, accessTokenExpiredAt);
String refreshToken = jwtTokenProvider.generate(subject, refreshTokenExpiredAt);

return AuthTokens.of(accessToken, refreshToken, BEARER_TYPE, ACCESS_TOKEN_EXPIRE_TIME / 1000L);
return AuthTokens.of(accessToken, refreshToken, ACCESS_TOKEN_EXPIRE_TIME / 1000L);
}

private Long extractMemberId(String accessToken) {
Expand Down

0 comments on commit 4decd4a

Please sign in to comment.