Skip to content

Commit

Permalink
Merge pull request #242 from mukgen/feature/auth
Browse files Browse the repository at this point in the history
๐Ÿ”€ :: feature/auth to main
  • Loading branch information
Daybreak312 authored Nov 9, 2023
2 parents 61da7f2 + 3bb685d commit 1b9eed1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,17 @@
import lombok.Builder;
import lombok.Getter;

import java.util.Date;

@Getter
@Builder
public class TokenResponse {

private String accessToken;

private Date accessTokenExp;

private String refreshToken;

private Date refreshTokenExp;
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,13 @@ public TokenResponse createToken(String accountId) {
.build()
);

Date now = new Date();

return TokenResponse.builder()
.accessToken(accessToken)
.accessTokenExp(new Date(now.getTime() + jwtProperties.getAccessExpiredExp()))
.refreshToken(refreshToken)
.refreshTokenExp(new Date(now.getTime() + jwtProperties.getRefreshExpiredExp()))
.build();
}

Expand Down

0 comments on commit 1b9eed1

Please sign in to comment.