Skip to content

Commit

Permalink
test: JWT test
Browse files Browse the repository at this point in the history
  • Loading branch information
rlarltj committed May 15, 2024
1 parent f3396ca commit 50f7619
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches:
- dev

- feat/**
# 권한 설정
permissions:
contents: read
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import com.moneymong.global.security.token.repository.RefreshTokenRepository;
import io.jsonwebtoken.Claims;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.stereotype.Service;
Expand All @@ -20,6 +21,7 @@
import java.util.*;

@Service
@Slf4j
@RequiredArgsConstructor
public class TokenService {

Expand All @@ -38,6 +40,7 @@ public Tokens createTokens(AuthUserInfo authUserInfo) {
String accessToken = createAccessToken(userId, role);
String refreshToken = createRefreshToken(userId, role);

log.info("[Token] = {}", accessToken);
return new Tokens(accessToken, refreshToken);
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,5 @@ jwt:
issuer: MONEYMONG
secret-key: ${JWT_SECRET_KEY}
expiry-seconds:
access-token: 1800
access-token: 1800000000
refresh-token: 1209600

0 comments on commit 50f7619

Please sign in to comment.